#!/bin/bash -l
-err-catch
+source /a/bin/errhandle/err
usage() {
- cat <<EOF
+ cat <<EOF
Usage: ${0##*/} [DISTRO_NAME]
Print packages to install for each distro.
Default DISTRO_NAME is the one currently running.
Note: Uses GNU getopt options parsing style
EOF
- exit $1
+ exit $1
}
if [[ $1 ]]; then
- distro=$1
+ distro=$1
else
- distro=$(distro-name)
+ distro=$(distro-name)
fi
isdeb() {
- case $distro in
- debian|trisquel|ubuntu)
- return 0
- ;;
- esac
- return 1
+ case $distro in
+ debian|trisquel|ubuntu)
+ return 0
+ ;;
+ esac
+ return 1
}
bool_opt=false # default
temp=$(getopt -l help,long-opt: hso: "$@") || usage 1
eval set -- "$temp"
while true; do
- case $1 in
- -s) bool_opt=true; shift ;;
- -o|--long-opt) long_opt="$2"; shift 2 ;;
- -h|--help) usage ;;
- --) shift; break ;;
- *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
- esac
+ case $1 in
+ -s) bool_opt=true; shift ;;
+ -o|--long-opt) long_opt="$2"; shift 2 ;;
+ -h|--help) usage ;;
+ --) shift; break ;;
+ *) echo "$0: Internal error! unexpected args: $*" ; exit 1 ;;
+ esac
done
case $distro in
- arch)
- # ubuntu 14.04 uses b-cron,
- # but its not maintained in arch.
- # of the ones in the main repos, cronie is only one maintained.
- # fcron appears abandoned software.
- e cronie
- ;;
- *) : ;; # other distros come with cron.
+ arch)
+ # ubuntu 14.04 uses b-cron,
+ # but its not maintained in arch.
+ # of the ones in the main repos, cronie is only one maintained.
+ # fcron appears abandoned software.
+ e cronie
+ ;;
+ *) : ;; # other distros come with cron.
esac
case $distro in
- arch) e tk ;;
- *) : ;; # other distros come with tk from git
+ arch) e tk ;;
+ *) : ;; # other distros come with tk from git
esac
case $distro in
- arch) e the_silver_searcher ;;
- debian|trisquel|ubuntu) e silversearcher-ag ;;
- # fedora unknown
+ arch) e the_silver_searcher ;;
+ debian|trisquel|ubuntu) e silversearcher-ag ;;
+ # fedora unknown
esac
if isdeb; then
- # for debconf-get-selections
- e debconf-utils
+ # for debconf-get-selections
+ e debconf-utils
fi
# needed for checkrestart
if isdeb; then
- e debian-goodies
+ e debian-goodies
fi
###### quit now for li/lj
case $HOSTNAME in
- lj|li)
- exit 0
- ;;
+ lj|li)
+ exit 0
+ ;;
esac
case $distro in
- debian) e gnome-session-flashback ;;
- # flidas is missing dependency gnome-panel. others unknown
+ debian) e gnome-session-flashback ;;
+ # flidas is missing dependency gnome-panel. others unknown
esac
case $distro in
- trisquel|ubuntu|debian) e ack-grep ;;
- arch|fedora) e ack ;;
- # fedora unknown
+ trisquel|ubuntu|debian) e ack-grep ;;
+ arch|fedora) e ack ;;
+ # fedora unknown
esac
case $distro in
- debian)
- e cpio-doc ;;
- # not packaged in flidas. in ubuntu it is in multiverse
+ debian)
+ e cpio-doc ;;
+ # not packaged in flidas. in ubuntu it is in multiverse
esac
case $distro in
- fedora) e unrar ;;
- *) e unrar-free ;;
+ fedora) e unrar ;;
+ *) e unrar-free ;;
esac
case $distro in
- debian|trisquel|ubuntu)
- # for gui bug reporting
- e python-vte
- ;;
- # no equivalent in other distros:
+ trisquel|ubuntu)
+ # for gui bug reporting
+ e python-vte
+ ;;
+ debian)
+ e reportbug-gtk
+ ;;
+ # no equivalent in other distros:
esac
case $distro in
- arch) e nfs-utils ;;
- trisquel|ubuntu|debian) e nfs-common ;;
+ arch) e nfs-utils ;;
+ trisquel|ubuntu|debian) e nfs-common ;;
esac
case $distro in
- trisquel|ubuntu|debian) e par2 ;;
- arch|fedora) e par2cmdline ;;
+ trisquel|ubuntu|debian) e par2 ;;
+ arch|fedora) e par2cmdline ;;
esac
# needed for my tex resume
case $distro in
- trisquel|ubuntu|debian) e texlive-full ;;
- arch) e texlive-most ;;
- # fedora unknown
+ trisquel|ubuntu|debian) e texlive-full ;;
+ arch) e texlive-most ;;
+ # fedora unknown
esac
case $distro in
- # optional dep for firefox for h.264 video
- arch) e gst-libav ;;
- # other distros, probably come by default
+ # optional dep for firefox for h.264 video
+ arch) e gst-libav ;;
+ # other distros, probably come by default
esac
case $distro in
- fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
- arch) : ;;
+ fedora|trisquel|ubuntu|debian) e gnupg-agent ;;
+ arch) : ;;
esac
case $distro in
- fedora) e pinentry-gtk ;;
- *) : ;; # comes default or with other packages
+ fedora) e pinentry-gtk ;;
+ *) : ;; # comes default or with other packages
esac
case $distro in
- arch) e firefox pulseaudio;;
- trisquel) e abrowser ;;
- *) : ;; # comes default or with other packages, or uknown
+ arch) e firefox pulseaudio ;;
+ trisquel) e abrowser ;;
+ *) : ;; # comes default or with other packages, or uknown
esac
case $distro in
- arch) e ttf-dejavu;;
- debian|trisquel|ubuntu) e fonts-dejavu ;;
- # others unknown
+ arch) e ttf-dejavu ;;
+ debian|trisquel|ubuntu) e fonts-dejavu ;;
+ # others unknown
esac
case $distro in
- arch) e xorg-xev;;
- debian|trisquel|ubuntu) e x11-utils ;;
- # others unknown
+ arch) e xorg-xev;;
+ debian|trisquel|ubuntu) e x11-utils ;;
+ # others unknown
esac
case $distro in
- arch) e virt-install;;&
- debian|trisquel|ubuntu) e virtinst ;;&
- *) e virt-manager ;; # creates the libvirt group in debian at least
- # others unknown
+ arch) e cdrkit;;
+ debian|trisquel|ubuntu) e genisoimage;;
+ # others unknown
esac
-
-
case $distro in
- arch) e cdrkit;;
- debian|trisquel|ubuntu) e genisoimage;;
- # others unknown
-esac
-
-case $distro in
- arch) e spice-gtk3 ;;
- debian|trisquel|ubuntu) e spice-client-gtk;;
- # others unknown
-esac
-
-case $distro in
- debian|trisquel|ubuntu)
- # fdroidcl dependency
- e golang-go
- ;;
- # others unknown
+ arch) e spice-gtk3 ;;
+ debian|trisquel|ubuntu) e spice-client-gtk;;
+ # others unknown
esac
### stuff brought in through deps in other distros
case $distro in
- arch)
- # for nat networking in libvirt
- e ebtables
- # dmidecode just because syslog complains
- e dmidecode
- e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
- # for dig
- e bind-tools
- ;;
-esac
-
-case $distro in
- fedora) cabal install shellcheck ;;
- *) e shellcheck ;;
- # unknown for older ubuntu
+ arch)
+ # for nat networking in libvirt
+ e ebtables
+ # dmidecode just because syslog complains
+ e dmidecode
+ e unzip xorg-xmodmap bridge-utils qemu virtviewer apg
+ # for dig
+ e bind-tools
+ ;;
esac
case $distro in
- arch|debian|trisquel|ubuntu) e pumpa ;;
- # others unknown. do have a buildscript:
- # /a/bin/buildscripts/pumpa ;;
+ arch|debian|trisquel|ubuntu) e pumpa ;;
+ # others unknown. do have a buildscript:
+ # /a/bin/buildscripts/pumpa ;;
esac
case $distro in
- debian) e adb ;;
- debian|trisquel|ubuntu) e android-tools-adbd ;;
- # todo: not sure this is needed anymore, or if trisqel etc works even
- # debian) e android-tools-adbd/unstable ;;
- arch) e android-tools ;;
- # other distros unknown
+ debian) e adb ;;
+ debian|trisquel|ubuntu) e android-tools-adbd ;;
+ # todo: not sure this is needed anymore, or if trisqel etc works even
+ # debian) e android-tools-adbd/unstable ;;
+ arch) e android-tools ;;
+ # other distros unknown
esac
-#### desktopy stuff
-case $distro in
- debian)
- e task-mate-desktop
- ;;
- trisquel)
- # mate-indicator-applet and beyond are msc things I noticed diffing a
- # standard install with mine.
- e xorg lightdm mate-desktop-environment mate-desktop-environment-extras mate-indicator-applet anacron
- ;;
- # others unknown
-esac
case $distro in
- debian|trisquel|ubuntu)
- e libosinfo-bin;
- ;;
- # others unknown
+ debian|trisquel|ubuntu)
+ e libosinfo-bin;
+ ;;
+ # others unknown
esac
case $distro in
- ubuntu|debian)
- e spacefm-gtk3 ;;
- arch)
- e spacefm ;;
+ ubuntu|debian)
+ e spacefm-gtk3 ;;
+ arch)
+ e spacefm ;;
esac