about summary refs log tree commit diff
path: root/bootstrap.sh
blob: d16de53aba871591ded446045b1255c467288267 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash

DISTRO="$1"
RELEASE="$2"
PKGLIST="${DISTRO}.pkglist"

[ -z $DISTRO -o -z $RELEASE ] && \
    printf "usage: sudo %s <distro> <release>\n" "$0" && exit 1

[[ $(id -u) != 0 ]] && \
    printf "re-run this as root\n" && exit 1

# make sure we have sources
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

apt update
apt upgrade -y
apt full-upgrade -y

apt install -y $(xargs < ${PKGLIST})


printf "install makefiles? [y/n]"
read answer

[[ "$answer" = "y" ]] && \
    make nuke install