kickstart (2404B)
1 #!/usr/bin/env bash 2 # 3 # ██ ██ ██ ██ ██ 4 # ░██ ░░ ░██ ░██ ░██ 5 # ░██ ██ ██ █████ ░██ ██ ██████ ██████ ██████ ██████ ██████ 6 # ░██ ██ ░██ ██░░░██░██ ██ ██░░░░ ░░░██░ ░░░░░░██ ░░██░░█░░░██░ 7 # ░████ ░██░██ ░░ ░████ ░░█████ ░██ ███████ ░██ ░ ░██ 8 # ░██░██ ░██░██ ██░██░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██ 9 # ░██░░██░██░░█████ ░██░░██ ██████ ░░██ ░░████████░███ ░░██ 10 # ░░ ░░ ░░ ░░░░░ ░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░ 11 # 12 # author ▓▒ pyratebeard <root@pyratebeard.net> 13 # code ▓▒ https://git.pyratebeard.net/setup 14 15 # ▓▓▒░ 16 17 # * install 18 # * git 19 # * make 20 # * bash 21 # * git clone 22 # * bitreich-drist 23 # * make install 24 # * setup 25 # * make all 26 27 if command -v pacman >/dev/null ; then 28 UPDATE="pacman -Sy" 29 PKGADD="pacman -S --noconfirm" 30 PKGDEL="pacman -Rs --noconfirm" 31 elif command -v apt >/dev/null ; then 32 UPDATE="apt update" 33 PKGADD="apt install -y" 34 PKGDEL="apt remove -y" 35 elif command -v pkg_add >/dev/null ; then 36 UPDATE="pkg_add -I -u" 37 PKGADD="pkg_add -I" 38 PKGDEL="pkg_delete -I" 39 fi 40 41 # ▓▓▒░ functions 42 function _echo() { printf "\n╓───── %s \n╙────────────────────────────────────── ─ ─ \n" "$1"; } 43 44 [ "$(id -u)" -ne 0 ] && { 45 _echo "got root?" >&2 46 exit 1 47 } 48 49 _echo "installing pre-req packages" 50 $UPDATE && $PKGADD git make bash rsync 51 52 _echo "installing drist" 53 git clone git://git.pyratebeard.net/bitreich-drist.git /opt/drist/ && \ 54 cd /opt/drist && \ 55 make install 56 57 _echo "know thyself" 58 ssh-keyscan localhost > /etc/ssh/ssh_known_hosts 59 60 _echo "cloning setup repo" 61 git clone git://git.pyratebeard.net/setup.git /tmp/setup && \ 62 cd /tmp/setup && \ 63 make