diff options
author | Ben Harris <ben@tilde.team> | 2019-03-25 21:53:58 -0400 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2019-03-25 21:53:58 -0400 |
commit | 6ead74a27ba7bf8267808a2000c9410b26f69663 (patch) | |
tree | 6e04c771029648c352b14ab1a61f765b8cc2ca75 /bootstrap.sh | |
parent | c6ee4d686ba36b58abfceedafdc446ea05cccbc8 (diff) |
update bootstrap script
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..ca12ac3 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +DISTRO="$1" +RELEASE="$2" +PKGLIST="${DISTRO}.pkglist" + +[ -z $DISTRO -o -z $RELEASE ] && \ + echo "usage: sudo $0 <distro> <release>" && exit 1 + +[[ $(id -u) != 0 ]] && \ + echo "re-run this as root" && exit 1 + +# make sure we have sources +echo "deb https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list +echo "deb https://weechat.org/${DISTRO} ${RELEASE} main" > /etc/apt/sources.list.d/weechat.list + +apt update +apt upgrade -y +apt full-upgrade -y + +apt install -y $(xargs < ${PKGLIST}) + + +echo -n "install makefiles? [y/n]" +read answer + +[[ "$answer" = "y" ]] && \ + make nuke install + |