lots of fixes
[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
195 ### stuff brought in through deps in other distros
196 case $distro in
197 arch)
198 # for nat networking in libvirt
199 e ebtables
200 # dmidecode just because syslog complains
201 e dmidecode
202 e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
203 # for dig
204 e bind-tools
205 ;;
206 esac
207
208 case $distro in
209 fedora) cabal install shellcheck ;;
210 *) e shellcheck ;;
211 # unknown for older ubuntu
212 esac
213
214 case $distro in
215 arch|debian|trisquel|ubuntu) e pumpa ;;
216 # others unknown. do have a buildscript:
217 # /a/bin/buildscripts/pumpa ;;
218 esac
219
220 case $distro in
221 debian) e adb ;;
222 debian|trisquel|ubuntu) e android-tools-adbd ;;
223 # todo: not sure this is needed anymore, or if trisqel etc works even
224 # debian) e android-tools-adbd/unstable ;;
225 arch) e android-tools ;;
226 # other distros unknown
227 esac
228
229 #### desktopy stuff
230 case $distro in
231 debian)
232 e task-mate-desktop
233 ;;
234 trisquel)
235 # mate-indicator-applet and beyond are msc things I noticed diffing a
236 # standard install with mine.
237 e xorg lightdm mate-desktop-environment mate-desktop-environment-extras mate-indicator-applet anacron
238 ;;
239 # others unknown
240 esac
241
242 case $distro in
243 debian|trisquel|ubuntu)
244 e libosinfo-bin;
245 ;;
246 # others unknown
247 esac
248
249 case $distro in
250 ubuntu|debian)
251 e spacefm-gtk3 ;;
252 arch)
253 e spacefm ;;
254 esac