2 # central installer script for pb suckless
4 if [ $(whoami) = "root" ] || [ $(whoami) = "manjaro" ]; then
5 echo "user check successful"
7 echo "please run this as root"
11 RAW="https://raw.githubusercontent.com"
13 if cat /etc/os-release | grep -Eiq 'name.*(arch|manjaro|ubuntu)'; then
14 curl -s "$RAW/instantOS/instantLOGO/master/ascii.txt"
16 echo "distro not supported"
17 echo "supported are: Arch, Manjaro, Ubuntu"
21 REALUSERS="$(ls /home/ | grep -v '+')"
22 export THEME=${1:-dracula}
24 # run a tool as every existing
25 # "real"(there's a human behind it) user
28 rm -rf /tmp/instantinstall.sh &> /dev/null
29 curl -Ls "$1" >/tmp/instantinstall.sh
30 chmod 777 /tmp/instantinstall.sh
32 if [ -n "$2" ] && getent passwd $2 && [ -e /home/$2 ]; then
33 echo "single user installation for $1"
34 sudo su "$2" -c /tmp/instantinstall.sh
36 for i in $REALUSERS; do
37 echo "processing user $i"
38 sudo su "$i" -c /tmp/instantinstall.sh
41 rm /tmp/instantinstall.sh
44 echo "installing dependencies"
45 curl -s $RAW/paperbenni/suckless/master/depend.sh | bash
47 echo "installing tools"
48 curl -s $RAW/paperbenni/suckless/master/rootinstall.sh | bash
49 userrun "$RAW/paperbenni/suckless/master/userinstall.sh"
51 echo "installing theme"
52 userrun "$RAW/instantOS/instantTHEMES/master/$THEME.sh"
54 echo "installing dotfiles"
55 curl -s $RAW/paperbenni/dotfiles/master/rootinstall.sh | bash
56 userrun $RAW/paperbenni/dotfiles/master/install.sh