OSDN Git Service

fix mirrors
authorpaperbenni <paperbenni@gmail.com>
Mon, 28 Sep 2020 18:21:46 +0000 (20:21 +0200)
committerpaperbenni <paperbenni@gmail.com>
Mon, 28 Sep 2020 18:21:46 +0000 (20:21 +0200)
programs/instantupdate
userinstall.sh

index c2cad36..0660708 100755 (executable)
@@ -1,18 +1,23 @@
 #!/bin/bash
 
-# update wrapper that applies changes to sudo hooks
+# upgrade instantOS to the next version
 
+if whoami | grep -q '^root$'
+then
+    echo "please do not run instantupdate as root"
+    exit 1
+fi
 if ! checkinternet; then
     echo "internet is required to upgrade instantOS"
     exit 1
 fi
 
-curl -s "https://raw.githubusercontent.com/instantOS/iso-profiles/master/pacclear.sh" | sudo bash
 sudo pacman -Sy --noconfirm
 
 instantshell
 sudo pacman -Syuu --noconfirm
-instantdotfiles -f
+command -v yay && yay
+instantdotfiles
 instantthemes a arc
 
 sudo bash /usr/share/instantutils/rootinstall.sh
@@ -25,3 +30,11 @@ then
 fi
 
 sudo pacdiff
+
+if grep '..' /etc/pacman.d/mirrorlist | grep -v '^#' | grep -q '..'
+then
+    echo "mirrors found"
+else
+    echo "mirrors have been cleared"
+    cat /usr/share/instantdotfiles/examplemirrors | sudo tee /etc/pacman.d/mirrorlist
+fi
index 41b3579..5c9ee23 100755 (executable)
@@ -4,7 +4,7 @@
 ## installs all instantOS tools            ##
 #############################################
 
-cd
+cd || echo "ERROR: could not go to HOME"
 echo "installing instantOS tools"
 
 # laptop specific stuff
@@ -30,4 +30,6 @@ fi
 instantmouse gen
 
 mkdir ~/instantos
+mkdir -p ~/.config/instantos
+
 iconf -i userinstall 1