Ticket #72: force_installation.2.patch
| File force_installation.2.patch, 2.3 kB (added by Hylk0r, 6 months ago) |
|---|
-
share/apkg-defs
old new 124 124 -h, --help Display this help screen 125 125 -p, --prefix Sets the prefix that the package will install to 126 126 -t, --ttyfe Forces the usage of the text based terminal frontend 127 --local-only Force installation locally 128 --root-only Force installation system-wide 127 129 " 128 130 129 131 intl_UNSUPPORTED_CPU_ARCH=$"Sorry, this package is incompatible with your CPU architecture. -
share/apkg-funclib
old new 1379 1379 # for the root password, because root will not be able to find the 1380 1380 # autopackage support libraries. 1381 1381 1382 if [[ `id -u` == 0 || ( ! -f /etc/autopackage/config && -f "${XDG_CONFIG_HOME:-$HOME/.config}/autopackage/config" ) || ("$autopackage_no_autosu" == "true" && "$1" != "--root-only") ]]; then1382 if [[ `id -u` == 0 || $INSTALL_FORCE == 2 || ( ! -f /etc/autopackage/config && -f "${XDG_CONFIG_HOME:-$HOME/.config}/autopackage/config" ) || ("$autopackage_no_autosu" == "true" && "$1" != "--root-only") ]]; then 1383 1383 # Filter out autosu arguments 1384 1384 while [[ "${1:0:1}" == "-" ]]; do 1385 1385 if [[ "$1" == '--root-only' ]]; then 1386 1386 shift 1387 elif [[ "$1" == '--local-only' ]]; then 1388 shift 1387 1389 elif [[ "$1" == '-m' ]]; then 1388 1390 shift 1389 1391 shift … … 1512 1514 "-h" | "--help") shift; out "$intl_INSTALLER_HELP"; _installerFinish; exit 0;; 1513 1515 "-g" | "--gtkfe") shift; export AUTOPACKAGE_FRONTEND="autopackage-frontend-gtk";; 1514 1516 "-t" | "--ttyfe") shift; export AUTOPACKAGE_FRONTEND="apkg-ttyfe";; 1517 "--local-only") shift; export INSTALL_FORCE=2;; # Force local installation 1518 "--root-only") shift; export INSTALL_FORCE=1;; # Force system-wide installation 1515 1519 *) red; outn "$intl_FAIL"; normal; out "$intl_UNKNOWN_OPTION" "$1"; shift; 1516 1520 shift; exit 1; 1517 1521 ;; … … 2224 2228 export AUTOSU_DISPLAYNAME="$DISPLAYNAME" 2225 2229 2226 2230 # recurse 2227 if [[ "$ROOTINSTALLONLY" == "Yes" ]]; then2231 if [[ "$ROOTINSTALLONLY" == "Yes" || $INSTALL_FORCE == 1 ]]; then 2228 2232 _autosuCommand --root-only "$_meta_dir/apkg-installer" "$@" 2229 2233 else 2230 2234 _autosuCommand "$_meta_dir/apkg-installer" "$@"
