fix mistake from recent commit
[distro-setup] / distro-pkgs
1 #!/bin/bash -l
2
3 err-catch
4
5
6 usage() {
7 cat <<EOF
8 Usage: ${0##*/} [DISTRO_NAME]
9 Print packages to install for each distro.
10 Default DISTRO_NAME is the one currently running.
11
12
13 -h|--help Print help and exit.
14
15 Note: Uses GNU getopt options parsing style
16 EOF
17 exit $1
18 }
19
20 if [[ $1 ]]; then
21 distro=$1
22 else
23 distro=$(distro-name)
24 fi
25
26 isdeb() {
27 case $distro in
28 debian|trisquel|ubuntu)
29 return 0
30 ;;
31 esac
32 return 1
33 }
34
35 bool_opt=false # default
36 long_opt=foo # default
37 temp=$(getopt -l help,long-opt: hso: "$@") || usage 1
38 eval set -- "$temp"
39 while true; do
40 case $1 in
41 -s) bool_opt=true; shift ;;
42 -o|--long-opt) long_opt="$2"; shift 2 ;;
43 -h|--help) usage ;;
44 --) shift; break ;;
45 *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
46 esac
47 done
48
49
50 case $distro in
51 arch)
52 # ubuntu 14.04 uses b-cron,
53 # but its not maintained in arch.
54 # of the ones in the main repos, cronie is only one maintained.
55 # fcron appears abandoned software.
56 e cronie
57 ;;
58 *) : ;; # other distros come with cron.
59 esac
60
61 case $distro in
62 arch) e tk ;;
63 *) : ;; # other distros come with tk from git
64 esac
65
66 case $distro in
67 arch) e the_silver_searcher ;;
68 debian|trisquel|ubuntu) e silversearcher-ag ;;
69 # fedora unknown
70 esac
71
72 if isdeb; then
73 # for debconf-get-selections
74 e debconf-utils
75 fi
76
77 # needed for checkrestart
78 if isdeb; then
79 e debian-goodies
80 fi
81
82 ###### quit now for li/lj
83 case $HOSTNAME in
84 lj|li)
85 exit 0
86 ;;
87 esac
88
89 case $distro in
90 debian) e gnome-session-flashback ;;
91 # flidas is missing dependency gnome-panel. others unknown
92 esac
93
94 case $distro in
95 trisquel|ubuntu|debian) e ack-grep ;;
96 arch|fedora) e ack ;;
97 # fedora unknown
98 esac
99
100 case $distro in
101 debian)
102 e cpio-doc ;;
103 # not packaged in flidas. in ubuntu it is in multiverse
104 esac
105
106 case $distro in
107 fedora) e unrar ;;
108 *) e unrar-free ;;
109 esac
110
111 case $distro in
112 debian|trisquel|ubuntu)
113 # for gui bug reporting
114 e python-vte
115 ;;
116 # no equivalent in other distros:
117 esac
118
119 case $distro in
120 arch) e nfs-utils ;;
121 trisquel|ubuntu|debian) e nfs-common ;;
122 esac
123
124 case $distro in
125 trisquel|ubuntu|debian) e par2 ;;
126 arch|fedora) e par2cmdline ;;
127 esac
128
129 # needed for my tex resume
130 case $distro in
131 trisquel|ubuntu|debian) e texlive-full ;;
132 arch) e texlive-most ;;
133 # fedora unknown
134 esac
135
136 case $distro in
137 # optional dep for firefox for h.264 video
138 arch) e gst-libav ;;
139 # other distros, probably come by default
140 esac
141
142 case $distro in
143 fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
144 arch) : ;;
145 esac
146
147
148 case $distro in
149 fedora) e pinentry-gtk ;;
150 *) : ;; # comes default or with other packages
151 esac
152
153 case $distro in
154 arch) e firefox pulseaudio;;
155 trisquel) e abrowser ;;
156 *) : ;; # comes default or with other packages, or uknown
157 esac
158
159
160 case $distro in
161 arch) e ttf-dejavu;;
162 debian|trisquel|ubuntu) e fonts-dejavu ;;
163 # others unknown
164 esac
165
166
167 case $distro in
168 arch) e xorg-xev;;
169 debian|trisquel|ubuntu) e x11-utils ;;
170 # others unknown
171 esac
172
173 case $distro in
174 arch) e virt-install;;&
175 debian|trisquel|ubuntu) e virtinst ;;&
176 *) e virt-manager ;; # creates the libvirt group in debian at least
177 # others unknown
178 esac
179
180
181
182 case $distro in
183 arch) e cdrkit;;
184 debian|trisquel|ubuntu) e genisoimage;;
185 # others unknown
186 esac
187
188 case $distro in
189 arch) e spice-gtk3 ;;
190 debian|trisquel|ubuntu) e spice-client-gtk;;
191 # others unknown
192 esac
193
194 case $distro in
195 debian|trisquel|ubuntu)
196 # fdroidcl dependency
197 e golang-go
198 ;;
199 # others unknown
200 esac
201
202
203 ### stuff brought in through deps in other distros
204 case $distro in
205 arch)
206 # for nat networking in libvirt
207 e ebtables
208 # dmidecode just because syslog complains
209 e dmidecode
210 e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
211 # for dig
212 e bind-tools
213 ;;
214 esac
215
216 case $distro in
217 fedora) cabal install shellcheck ;;
218 *) e shellcheck ;;
219 # unknown for older ubuntu
220 esac
221
222 case $distro in
223 arch|debian|trisquel|ubuntu) e pumpa ;;
224 # others unknown. do have a buildscript:
225 # /a/bin/buildscripts/pumpa ;;
226 esac
227
228 case $distro in
229 debian) e adb ;;
230 debian|trisquel|ubuntu) e android-tools-adbd ;;
231 # todo: not sure this is needed anymore, or if trisqel etc works even
232 # debian) e android-tools-adbd/unstable ;;
233 arch) e android-tools ;;
234 # other distros unknown
235 esac
236
237 #### desktopy stuff
238 case $distro in
239 debian)
240 e task-mate-desktop
241 ;;
242 trisquel)
243 # mate-indicator-applet and beyond are msc things I noticed diffing a
244 # standard install with mine.
245 e xorg lightdm mate-desktop-environment mate-desktop-environment-extras mate-indicator-applet anacron
246 ;;
247 # others unknown
248 esac
249
250 case $distro in
251 debian|trisquel|ubuntu)
252 e libosinfo-bin;
253 ;;
254 # others unknown
255 esac
256
257 case $distro in
258 ubuntu|debian)
259 e spacefm-gtk3 ;;
260 arch)
261 e spacefm ;;
262 esac