Browse Source

Add additional confirmation request to package build.

Raphael Schneeberger 6 years ago
parent
commit
4681c52506
1 changed files with 14 additions and 8 deletions
  1. 14 8
      bin/v-update-sys-hestia-git

+ 14 - 8
bin/v-update-sys-hestia-git

@@ -374,12 +374,18 @@ fi
 #################################################################################
 
 if [ "$install" = 'yes' ] || [ "$install" = 'y' ]; then
-    echo "Installing packages..."
-    for i in $DEB_DIR/*.deb; do
-        # Install all available packages
-        dpkg -i $i
-    done
-    unset $answer
-    # Remove temporary files
-    rm -rf $BUILD_DIR
+    echo "!!! Development builds should not be installed on systems with live production data without understanding the potential risks involved. !!!"
+    read -p 'Do you want to proceed the package installation? [y/n] ' answer
+    if [ "$answer" = 'y' ] || [ "$answer" = 'Y'  ]; then
+        echo "Installing packages..."
+        for i in $DEB_DIR/*.deb; do
+            # Install all available packages
+            dpkg -i $i
+        done
+        unset $answer
+        # Remove temporary files
+        rm -rf $BUILD_DIR
+    else
+        check_result 1 "Package installation cancelled..."
+    fi
 fi