From 40decd4ec16c9278bf2c13d731872dcd21868cb6 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Mon, 24 Oct 2016 23:18:30 +0200 Subject: [PATCH] Change _nuke_dir_install to _astronaut_nuke_dir_install and add _astronaut_no_load_config --- astronaut/astronaut | 10 +++++----- astronaut/astronautpkg | 2 +- astronaut/pacman-astronaut | 2 +- astronaut/xbps-astronaut | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/astronaut/astronaut b/astronaut/astronaut index ecd4760..08af699 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -55,8 +55,8 @@ package_options() { :; } # Per-package options function. # } # Load any user configuration -[ -f /etc/astronaut.conf ] && . /etc/astronaut.conf -[ -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf" +[ ! "$_astronaut_no_load_config" = true -a -f /etc/astronaut.conf ] && . /etc/astronaut.conf +[ ! "$_astronaut_no_load_config" = true -a -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf" # Options not in the configuration _download_only=false @@ -64,7 +64,7 @@ _vcs_only=false vcs_compile=false unset _user_options # Options specified in the command line get the highest priority 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 unset name @@ -127,7 +127,7 @@ while getopts "h?s:b:i:r:p:IcCdvo:" opt; do dir_prefix="$OPTARG" ;; I) - _nuke_dir_install=true + _astronaut_nuke_dir_install=true ;; d) _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")" # 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" fi diff --git a/astronaut/astronautpkg b/astronaut/astronautpkg index 6bb90d2..29f271c 100755 --- a/astronaut/astronautpkg +++ b/astronaut/astronautpkg @@ -16,7 +16,7 @@ _topdir=$PWD _astronaut="$(dirname "$0")/astronaut" [ ! -f "$_astronaut" ] && _astronaut='astronaut' -_nuke_dir_install=true +_astronaut_nuke_dir_install=true . "$_astronaut" diff --git a/astronaut/pacman-astronaut b/astronaut/pacman-astronaut index 76e807a..a920ef4 100755 --- a/astronaut/pacman-astronaut +++ b/astronaut/pacman-astronaut @@ -10,7 +10,7 @@ _topdir=$PWD _astronaut="$(dirname "$0")/astronaut" [ ! -f "$_astronaut" ] && _astronaut="astronaut" -_nuke_dir_install=true +_astronaut_nuke_dir_install=true . "$_astronaut" diff --git a/astronaut/xbps-astronaut b/astronaut/xbps-astronaut index bc813f2..d43d902 100755 --- a/astronaut/xbps-astronaut +++ b/astronaut/xbps-astronaut @@ -10,7 +10,7 @@ _topdir=$PWD _astronaut="$(dirname "$0")/astronaut" [ ! -f "$_astronaut" ] && _astronaut="astronaut" -_nuke_dir_install=true +_astronaut_nuke_dir_install=true . "$_astronaut"