-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-packages
executable file
·139 lines (131 loc) · 3.89 KB
/
install-packages
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/bin/bash
help(){
printf "Presents a checklist of packages from the official Arch repo,\n"
printf "the AUR, and the packages in the arch-pkgs subdirectory.\n"
printf "Additionally installs configuration repositories.\n"
printf "\n "
printf "The actual work is in the Makefile. It handles the dependencies\n"
printf "and knows how to install from the arch-pkgs repo (another make) or\n"
printf "the AUR or a regular repo with a Makefile.\n"
printf "The official repo is accessed by the meta-packages in arch-pkgs\n"
printf "The aur packages are installed directly by the Makefile. \n"
printf "Make calls make for each of the configuration repos as needed.\n"
printf "\n "
printf "In reality this is just a nice front end to the Makefile.\n"
printf "You may almost as easily install everthing as you wish from \n"
printf "the command line by using make. Doing that will give much more\n"
printf "granular control.\n"
printf "\n "
printf "Some options require sudo. Just rerun this and choose only them,\n"
printf "Or run them directly with sudo make.\n"
printf "\n "
printf "Options: \n"
printf " -h This help text.\n"
exit
}
# $opt will hold the current option
opt=''
while getopts h opt; do
# loop continues till options finished
# see which pattern $opt matches...
case $opt in
(h)
help
;;
# matches a question mark
# (and nothing else, see text)
(\?)
printf "Bad option:" # $*
printf " "
help
return 1
;;
esac
done
(( OPTIND > 1 )) && shift $(( OPTIND - 1 ))
### Set up logging ###
exec 1> >(tee "pkg-install.log")
exec 2> >(tee "pkg-install.log")
# create a menu.
cmd=(dialog --stdout --separate-output --checklist "Select Packages to install" 22 77 16)
options=(
1 "Necessities - shells, utilities, ssh, traceroute, yay, etc." on
2 "X11 - xorg, libreOffice, vivaldi, etc." on
3 "Xmonad - Haskell, polybar, etc." on
4 "dot files - (.zsh, .Xresources, .icons, ~/bin, etc" on
5 "Emacs config with accomplices (isync, mu4e,...)" on
6 "Emacs config sans accomplices" off
7 "Xfce" off
8 "development - clojure, python, ruby, racket, guile, etc." on
9 "Tablet - Pen stuff - krita, cellwriter, onboard..." on
10 "Natural language - hunspell, languagetool, ..." on
11 "Mobile Studio Pro - Nvidia, hidpi" off
12 "High DPI screen, .Xresources mods, Resolution 3840x2160" on
13 "Xmonad Xsession (requires sudo)" off
14 "Account setup - dotfiles, emacs, Xmonad" off
15 "Anbox - run android in a container" off
16 "Enable Anbox - configure and enable the anbox daemons (requires sudo)" off
17 "Iot - particle.io-cli, dfu-util, python..." off
17 "All" off )
# display menu and get the choices
choices=$("${cmd[@]}" "${options[@]}")
# clear
for choice in ${choices[@]}
do
case $choice in
1)
make base
;;
2)
make X11
;;
3)
make xmonad-setup
;;
4)
make dotfiles
;;
5)
make emacs-setup-w-extras
;;
6)
make emacs-setup
;;
7)
make Xfce
;;
8)
make devel
;;
9)
make tablet
;;
10)
make natural-language
;;
11)
make mobile-studio-pro
;;
12)
make hidpi
;;
13)
make -C xmonad-setup xsession
;;
14)
make account
;;
15)
make anbox
;;
16)
make -C dotfiles enable-anbox
;;
17)
make Iot
;;
18)
make all
;;
esac
done