Create LICENSE.md
[updater/.git] / updaterselector
1 #!/bin/bash
2
3
4 eval 'resize'; #this creates variables for the size of the terminal
5
6
7 #In the next line we do the trick of asignning the output to a variable, but we invert stdout and stderr via the "3>&1 1>&2 2>&3" part, because whiptail exports via stderr
8
9
10 value1=$(whiptail --title "Global package manager" --menu "What are we managing today?" $(( $LINES - 8 )) $(( $COLUMNS - 4 )) $(( $LINES - 16 )) \
11 "1" "APT" \
12 "2" "PACMAN" \
13 "3" "YAY" \
14 "4" "DNF" \
15 "5" "PIP (python installer)" \
16 "6" "NODE.JS Modules in this directory" \
17 "7" "CLOSE THIS" 3>&1 1>&2 2>&3)
18
19
20 if [ $value1 == "7" ]
21 then
22   exit 0;
23 fi
24
25
26 value2=$(whiptail --title "Global package manager" --menu "What do you want to do?" $(( $LINES - 8 )) $(( $COLUMNS - 4 )) $(( $LINES - 16 )) \
27 "1" "Install package" \
28 "2" "Update/reinstall specific package" \
29 "3" "Uninstall package" \
30 "4" "See installed packages" \
31 "5" "Search for a package" \
32 "6" "CLOSE THIS" 3>&1 1>&2 2>&3)
33
34
35 case $value1 in
36 1)
37   . $(pwd)/updaterdeb $value2;
38   ;;
39 2)
40   . $(pwd)/updaterarch $value2 0;
41   ;;
42 3)
43   . $(pwd)/updaterarch $value2 1;
44   ;;
45 3)
46   . $(pwd)/updaterfed $value2;
47   ;;
48 5)
49   . $(pwd)/updaterpip $value2;
50   ;;
51 6)
52   . $(pwd)/updaternpm $value2;
53   ;;
54 esac
55