rm /tmp/instantinstall.sh
}
+usercmd() {
+ for i in $REALUSERS; do
+ echo "processing user $i"
+ sudo su "$i" -c "$1"
+ done
+}
+
rootrun() {
if [[ "$1" =~ "/" ]]; then
RUNSCRIPT="$1"
#!/bin/bash
-if [ -z "$@" ]; then
- curl -s https://raw.githubusercontent.com/instantos/instantos/master/install.sh | sudo bash &>~/instantosinstall.log
-else
- curl -s https://raw.githubusercontent.com/instantos/instantos/master/install.sh | sudo bash -s $@ 2>&1 | tee ~/instantosinstall.log
+
+if ping -c 1 google.com; then
+ if [ -z "$@" ]; then
+ curl -s https://raw.githubusercontent.com/instantos/instantos/master/install.sh | sudo bash 2>&1 | tee ~/instantosinstall.log
+ else
+ curl -s https://raw.githubusercontent.com/instantos/instantos/master/install.sh | sudo bash -s $@ 2>&1 | tee ~/instantosinstall.log
+ fi
fi
## installs all instantOS tools ##
#############################################
-cd "$HOME"
-
+cd
echo "installing instantOS tools"
-RAW="https://raw.githubusercontent.com"
-LINK="$RAW/instantos/instantos/master"
-
-cd "$HOME"
-
# laptop specific stuff
if acpi | grep -q '[0-9]%' &>/dev/null; then
# config file to indicate being a laptop