git-svn-id: http://code.autistici.org/svn/backupninja/trunk@144 758a04ac-41e6-0310...
authorelijah <elijah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Fri, 15 Jul 2005 04:14:56 +0000 (04:14 +0000)
committerelijah <elijah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Fri, 15 Jul 2005 04:14:56 +0000 (04:14 +0000)
ninjahelper

index f4871830e0143f7fd653d9b9db308932a4765bb1..aedeaf5b84db577b0d1e76fbb9f8d648cb733e9b 100755 (executable)
@@ -145,6 +145,23 @@ doaction() {
 #####################################################
 ## begin program
 
+if [ ! -x "`which dialog`" ]; then
+       echo "ninjahelper is a menu based wizard for backupninja."
+       echo "It requires 'dialog' in order to run. Do you want to install dialog now?"
+       while true; do
+         echo -n "(yes/no): "
+         read install
+         if [ "$install" == "yes" ]; then
+            apt-get install dialog
+            break
+         elif [ "$install" == "no" ]; then
+            exit
+         else
+            echo "You must answer 'yes' or 'no'"
+         fi
+    done
+fi
+
 conffile="/etc/backupninja.conf"
 if [ ! -r "$conffile" ]; then
        echo "Configuration file $conffile not found."