OSDN Git Service

fix locale settings
[instantos/instantARCH.git] / installutils.sh
index 123a5bf..18bc2ca 100755 (executable)
@@ -2,20 +2,28 @@
 
 # functions used for the actual installation
 
+# reset working dir
 rcd() {
     cd /root/instantARCH
 }
 
+# this gets executed if a module fails
+# it marks the installation as failed
 serror() {
+    # touching noerror skips error checking for one check
     if [ -e /opt/noerror ]; then
         echo "skipping error"
         rm /opt/noerror
     else
+        # indicator file
+        touch /opt/installfailed
         echo "script failed"
         exit 1
     fi
 }
 
+# this sets the status message
+# displayed at the bottom of the screen when using the GUI installer
 setinfo() {
     if [ -e /usr/share/liveutils ]; then
         pkill instantmenu
@@ -24,6 +32,7 @@ setinfo() {
     echo "$@"
 }
 
+# run a script inside the installation medium
 escript() {
     setinfo "${2:-info}"
     rcd
@@ -43,8 +52,10 @@ chrootscript() {
 
     if command -v arch-chroot; then
         arch-chroot /mnt "/root/instantARCH/${1}.sh" || serror
-    else
+    elif command -v manjaro-chroot; then
         manjaro-chroot /mnt "/root/instantARCH/${1}.sh" || serror
+    else
+        artools-chroot /mnt "/root/instantARCH/${1}.sh" || serror
     fi
 
     echo "chroot: $1" >>/tmp/instantprogress