Browse Source

Change _nuke_dir_install to _astronaut_nuke_dir_install and add _astronaut_no_load_config

master
mid-kid 8 years ago
parent
commit
40decd4ec1
  1. 10
      astronaut/astronaut
  2. 2
      astronaut/astronautpkg
  3. 2
      astronaut/pacman-astronaut
  4. 2
      astronaut/xbps-astronaut

10
astronaut/astronaut

@ -55,8 +55,8 @@ package_options() { :; } # Per-package options function.
# } # }
# Load any user configuration # Load any user configuration
[ -f /etc/astronaut.conf ] && . /etc/astronaut.conf [ ! "$_astronaut_no_load_config" = true -a -f /etc/astronaut.conf ] && . /etc/astronaut.conf
[ -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf" [ ! "$_astronaut_no_load_config" = true -a -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf"
# Options not in the configuration # Options not in the configuration
_download_only=false _download_only=false
@ -64,7 +64,7 @@ _vcs_only=false
vcs_compile=false vcs_compile=false
unset _user_options # Options specified in the command line get the highest priority unset _user_options # Options specified in the command line get the highest priority
unset _sat_options # Options defined by the satellite unset _sat_options # Options defined by the satellite
#_nuke_dir_install (This can be set from wrappers) #_astronaut_nuke_dir_install (This can be set from wrappers)
# Should be specified in the satellite # Should be specified in the satellite
unset name unset name
@ -127,7 +127,7 @@ while getopts "h?s:b:i:r:p:IcCdvo:" opt; do
dir_prefix="$OPTARG" dir_prefix="$OPTARG"
;; ;;
I) I)
_nuke_dir_install=true _astronaut_nuke_dir_install=true
;; ;;
d) d)
_download_only=true _download_only=true
@ -338,7 +338,7 @@ if [ "$_download_only" = false ]; then
dir_install="$(echo "$dir_install" | sed -e "s/{pkg}/$(safe_sed "$satname")/g")" dir_install="$(echo "$dir_install" | sed -e "s/{pkg}/$(safe_sed "$satname")/g")"
# This variable can be set by a wrapper script in need to nuke the install dir. # This variable can be set by a wrapper script in need to nuke the install dir.
if [ "$_nuke_dir_install" = true -a ! -z "$dir_install" ]; then if [ "$_astronaut_nuke_dir_install" = true -a ! -z "$dir_install" ]; then
rm -rf "$dir_install" rm -rf "$dir_install"
fi fi

2
astronaut/astronautpkg

@ -16,7 +16,7 @@ _topdir=$PWD
_astronaut="$(dirname "$0")/astronaut" _astronaut="$(dirname "$0")/astronaut"
[ ! -f "$_astronaut" ] && _astronaut='astronaut' [ ! -f "$_astronaut" ] && _astronaut='astronaut'
_nuke_dir_install=true _astronaut_nuke_dir_install=true
. "$_astronaut" . "$_astronaut"

2
astronaut/pacman-astronaut

@ -10,7 +10,7 @@ _topdir=$PWD
_astronaut="$(dirname "$0")/astronaut" _astronaut="$(dirname "$0")/astronaut"
[ ! -f "$_astronaut" ] && _astronaut="astronaut" [ ! -f "$_astronaut" ] && _astronaut="astronaut"
_nuke_dir_install=true _astronaut_nuke_dir_install=true
. "$_astronaut" . "$_astronaut"

2
astronaut/xbps-astronaut

@ -10,7 +10,7 @@ _topdir=$PWD
_astronaut="$(dirname "$0")/astronaut" _astronaut="$(dirname "$0")/astronaut"
[ ! -f "$_astronaut" ] && _astronaut="astronaut" [ ! -f "$_astronaut" ] && _astronaut="astronaut"
_nuke_dir_install=true _astronaut_nuke_dir_install=true
. "$_astronaut" . "$_astronaut"

Loading…
Cancel
Save