2019-03-26 01:53:58 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
DISTRO="$1"
|
|
|
|
RELEASE="$2"
|
|
|
|
PKGLIST="${DISTRO}.pkglist"
|
|
|
|
|
|
|
|
[ -z $DISTRO -o -z $RELEASE ] && \
|
2020-02-26 20:26:00 +00:00
|
|
|
printf "usage: sudo %s <distro> <release>\n" "$0" && exit 1
|
2019-03-26 01:53:58 +00:00
|
|
|
|
|
|
|
[[ $(id -u) != 0 ]] && \
|
2020-02-26 20:26:00 +00:00
|
|
|
printf "re-run this as root\n" && exit 1
|
2019-03-26 01:53:58 +00:00
|
|
|
|
|
|
|
# make sure we have sources
|
2020-02-26 20:26:00 +00:00
|
|
|
printf "deb https://mirror.bhh.sh/syncthing/ syncthing stable\n" \
|
|
|
|
> /etc/apt/sources.list.d/syncthing.list
|
|
|
|
printf "deb https://mirror.bhh.sh/weechat/%s %s main \n" "${DISTRO}" "${RELEASE}" \
|
|
|
|
> /etc/apt/sources.list.d/weechat.list
|
2019-03-26 01:53:58 +00:00
|
|
|
|
|
|
|
apt update
|
|
|
|
apt upgrade -y
|
|
|
|
apt full-upgrade -y
|
|
|
|
|
|
|
|
apt install -y $(xargs < ${PKGLIST})
|
|
|
|
|
|
|
|
|
2020-02-26 20:26:00 +00:00
|
|
|
printf "install makefiles? [y/n]"
|
2019-03-26 01:53:58 +00:00
|
|
|
read answer
|
|
|
|
|
|
|
|
[[ "$answer" = "y" ]] && \
|
|
|
|
make nuke install
|
|
|
|
|