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