diff packaging/linux-installer.inc @ 1182:0651afddb4ec

Merged.
author Emanuel Schuetze <emanuel@intevation.de>
date Mon, 22 Sep 2014 12:40:06 +0200
parents 53a02fbe2fc9
children 969970a83b6d
line wrap: on
line diff
--- a/packaging/linux-installer.inc	Mon Sep 22 12:38:06 2014 +0200
+++ b/packaging/linux-installer.inc	Mon Sep 22 12:40:06 2014 +0200
@@ -51,7 +51,7 @@
   getxt "  -p, --prefix=PATH  install files in PATH\n"
   getxt "  -f, --force        install to given prefix, even when a current\n"
   getxt "                     installation with different prefix exists.\n"
-  getxt "  -d, --deinstall    deinstall files from current installation\n"
+  getxt "  -u, --uninstall    uninstall files from current installation\n"
   getxt "  -s, --system       create a system wide (de)installation\n"
   getxt "      --help         display this help and exit\n"
   getxt "      --version      output version information and exit\n"
@@ -61,7 +61,7 @@
 parse_args()
 {
   OPTS=`getopt \
-      -l deinstall,update,show-after-update,force,help,prefix:,system,version \
+      -l uninstall,update,show-after-update,force,help,prefix:,system,version \
       -o d,f,p:,s -n "$ME" -- "$@"`
   [ $? -eq 0 ] || usage 23
 
@@ -81,7 +81,7 @@
         FORCE=1
         shift 1
         ;;
-      --deinstall|-d)
+      --uninstall|-u)
         DEINSTALL=1
         shift 1
         ;;
@@ -119,8 +119,8 @@
   getxt "TrustBridge has been installed to: '%s'\n\n" "${instcfg[PREFIX]}"
 
   getxt "To remove the application and the root certificates it has inserted,\n"
-  getxt "call the deinstall command:\n"
-  echo "  $RUNCMD ${instcfg[PREFIX]}/bin/trustbridge-deinstall.sh"
+  getxt "call the uninstall command:\n"
+  echo "  $RUNCMD ${instcfg[PREFIX]}/bin/trustbridge-uninstall.sh"
 
   echo "#################################################################################"
   getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge"
@@ -296,12 +296,21 @@
         getxt "An existing installation (v%s) was detected!\n" "${oldinstcfg[VERSION]}"
         getxt "It is HIGHLY RECOMMENDED to accept the default prefix\n"
         getxt "to update the current installation.\n"
-        getxt "For a new prefix you should deinstall first!\n"
+        getxt "For a new prefix you should uninstall first!\n"
     fi
-    getxt "Select installation prefix for TrustBridge [%s]: " "${inst_default_prefix}"
-    read -e instcfg[PREFIX]
-
-    [ -z "${instcfg[PREFIX]}" ] && instcfg[PREFIX]="${inst_default_prefix}"
+    until [ "${instcfg[PREFIX]}" ] ; do
+      getxt "Select installation prefix for TrustBridge [%s]: " "${inst_default_prefix}"
+      read -e instcfg[PREFIX]
+      if echo "${instcfg[PREFIX]}" | grep -q '[~$"\\]' ; then
+          getxt "\nWARNING: The given path name contains special characters\n"
+          getxt "(one or more of %s )\n" "~ $ \" \\"
+          getxt "Please note that these characters are not expanded by the installer,\n"
+          getxt "the installation directory will be containing these characters verbatim.\n\n"
+          getxt "Do you really want to use %s as installation prefix?\n" "${instcfg[PREFIX]}"
+          yorn || { instcfg[PREFIX]="" ; continue ; }
+      fi
+      [ -z "${instcfg[PREFIX]}" ] && instcfg[PREFIX]="${inst_default_prefix}"
+    done
 else
   # Prefix was given on invocation:
   if [ "${oldinstcfg[PREFIX]}" -a \

http://wald.intevation.org/projects/trustbridge/