comparison packaging/linux-installer.inc @ 1173:7282def018bc

Warn if installation path contains suspicious special characters.
author Sascha Wilde <wilde@intevation.de>
date Fri, 19 Sep 2014 17:32:14 +0200
parents d51ae656cfd6
children 53a02fbe2fc9
comparison
equal deleted inserted replaced
1172:7d4dbcb2efb4 1173:7282def018bc
296 getxt "An existing installation (v%s) was detected!\n" "${oldinstcfg[VERSION]}" 296 getxt "An existing installation (v%s) was detected!\n" "${oldinstcfg[VERSION]}"
297 getxt "It is HIGHLY RECOMMENDED to accept the default prefix\n" 297 getxt "It is HIGHLY RECOMMENDED to accept the default prefix\n"
298 getxt "to update the current installation.\n" 298 getxt "to update the current installation.\n"
299 getxt "For a new prefix you should deinstall first!\n" 299 getxt "For a new prefix you should deinstall first!\n"
300 fi 300 fi
301 getxt "Select installation prefix for TrustBridge [%s]: " "${inst_default_prefix}" 301 until [ "${instcfg[PREFIX]}" ] ; do
302 read -e instcfg[PREFIX] 302 getxt "Select installation prefix for TrustBridge [%s]: " "${inst_default_prefix}"
303 303 read -e instcfg[PREFIX]
304 [ -z "${instcfg[PREFIX]}" ] && instcfg[PREFIX]="${inst_default_prefix}" 304 if echo "${instcfg[PREFIX]}" | grep -q '[~$"\\]' ; then
305 getxt "\nWARNING: The given path name contains special characters\n"
306 getxt "(one or more of %s )\n" "~ $ \" \\"
307 getxt "Please note that these characters are not expanded by the installer,\n"
308 getxt "the installation directory will be containing these characters verbatim.\n\n"
309 getxt "Do you really want to use %s as installation prefix?\n" "${instcfg[PREFIX]}"
310 yorn || { instcfg[PREFIX]="" ; continue ; }
311 fi
312 [ -z "${instcfg[PREFIX]}" ] && instcfg[PREFIX]="${inst_default_prefix}"
313 done
305 else 314 else
306 # Prefix was given on invocation: 315 # Prefix was given on invocation:
307 if [ "${oldinstcfg[PREFIX]}" -a \ 316 if [ "${oldinstcfg[PREFIX]}" -a \
308 "${instcfg[PREFIX]}" != "${oldinstcfg[PREFIX]}" -a \ 317 "${instcfg[PREFIX]}" != "${oldinstcfg[PREFIX]}" -a \
309 $FORCE -ne 1 ] ; then 318 $FORCE -ne 1 ] ; then

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