2 # central installer script for instantOS
4 export PAPERSILENT="True"
6 if [ $(whoami) = "root" ] || [ $(whoami) = "manjaro" ]; then
7 echo "user check successful"
9 echo "please run this as root"
13 RAW="https://raw.githubusercontent.com"
15 if cat /etc/os-release | grep -Eiq 'name.*(arch|manjaro|ubuntu)'; then
16 curl -s "$RAW/instantOS/instantLOGO/master/ascii.txt"
19 echo "distro not supported"
20 echo "supported are: Arch, Manjaro, Ubuntu"
24 REALUSERS="$(ls /home/ | grep -v '+')"
25 export THEME=${1:-dracula}
27 # run a tool as every existing
28 # "real"(there's a human behind it) user
31 rm -rf /tmp/instantinstall.sh &>/dev/null
32 curl -s "$1" >/tmp/instantinstall.sh
33 chmod 777 /tmp/instantinstall.sh
35 if [ -n "$2" ] && getent passwd $2 && [ -e /home/$2 ]; then
36 echo "single user installation for $1"
37 sudo su "$2" -c /tmp/instantinstall.sh
39 for i in $REALUSERS; do
40 echo "processing user $i"
41 sudo su "$i" -c /tmp/instantinstall.sh
44 rm /tmp/instantinstall.sh
48 if [[ "$1" =~ "/" ]]; then
51 RUNSCRIPT="$RAW/instantos/instantos/master/$1"
54 curl -s "$RUNSCRIPT" | bash -s $@
57 echo "installing dependencies"
60 echo "root: installing tools"
61 rootrun rootinstall.sh "$1"
63 userrun "$RAW/instantos/instantos/master/userinstall.sh"
65 echo "installing theme"
66 userrun "$RAW/instantOS/instantTHEMES/master/$THEME.sh"
68 echo "installing dotfiles"
69 rootrun $RAW/paperbenni/dotfiles/master/rootinstall.sh
70 userrun $RAW/paperbenni/dotfiles/master/userinstall.sh
72 userrun "$RAW/instantos/instantos/master/userdepend.sh"