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)'; then
16 curl -s "$RAW/instantOS/instantLOGO/master/ascii.txt"
19 echo "distro not supported"
20 echo "supported are: Arch, Manjaro"
24 REALUSERS="$(ls /home/ | grep -v '+')"
25 export THEME=${1:-arc}
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 REALUSERS="$(ls /home/ | grep -v '+')"
49 for i in $REALUSERS; do
50 echo "processing user $i"
56 if [[ "$1" =~ "/" ]]; then
59 RUNSCRIPT="$RAW/instantos/instantos/master/$1"
62 curl -s "$RUNSCRIPT" | bash -s $@
65 echo "installing dependencies"
68 echo "root: installing tools"
69 rootrun rootinstall.sh "$1"
71 userrun "$RAW/instantos/instantos/master/userinstall.sh"
75 echo "installing dotfiles"