OSDN Git Service

clean up
authorpaperbenni <paperbenni@gmail.com>
Sun, 2 Feb 2020 16:48:17 +0000 (17:48 +0100)
committerpaperbenni <paperbenni@gmail.com>
Sun, 2 Feb 2020 16:48:17 +0000 (17:48 +0100)
install.sh
installinstantos
userinstall.sh

index e463604..38ae1c5 100755 (executable)
@@ -44,6 +44,13 @@ userrun() {
     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"
index 72ae3eb..5bae2c9 100755 (executable)
@@ -1,6 +1,9 @@
 #!/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
index e1cb671..ba52369 100755 (executable)
@@ -4,15 +4,9 @@
 ## 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