Fix reset
This commit is contained in:
@@ -456,7 +456,7 @@ fromSource() {
|
|||||||
|
|
||||||
pushd "$src_dir" || return 1
|
pushd "$src_dir" || return 1
|
||||||
|
|
||||||
if [[ ${P_ARR['release']} == "snapshot" ]]; then
|
if [[ ${P_ARR[release]} == "snapshot" ]]; then
|
||||||
git checkout master
|
git checkout master
|
||||||
else
|
else
|
||||||
git checkout "v$RELEASE"
|
git checkout "v$RELEASE"
|
||||||
@@ -538,7 +538,7 @@ init() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
debug "Detected host platform: $ID $VERSION_ID"
|
debug "Detected host platform: $ID"
|
||||||
|
|
||||||
# normalize distro ID
|
# normalize distro ID
|
||||||
case "$ID" in
|
case "$ID" in
|
||||||
@@ -581,7 +581,7 @@ init() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
debug "Using host platform: $ID $VERSION_ID"
|
debug "Using host platform: $ID"
|
||||||
|
|
||||||
# Set distro-specific functions
|
# Set distro-specific functions
|
||||||
case "$ID" in
|
case "$ID" in
|
||||||
@@ -610,6 +610,10 @@ main() {
|
|||||||
|
|
||||||
readInput "$@"
|
readInput "$@"
|
||||||
|
|
||||||
|
# Fallback to SCRIPTDIR if BUILDROOT has not been set
|
||||||
|
declare -g BUILDROOT="${BUILDROOT:=$SCRIPTDIR}"
|
||||||
|
declare -g FILESDIR="${FILESDIR:=$BUILDROOT/files}"
|
||||||
|
|
||||||
# Allow --reset without a profile
|
# Allow --reset without a profile
|
||||||
if [[ ${#PROFILES} -lt 1 ]]; then
|
if [[ ${#PROFILES} -lt 1 ]]; then
|
||||||
if (( RESET )); then
|
if (( RESET )); then
|
||||||
@@ -626,12 +630,9 @@ main() {
|
|||||||
|
|
||||||
debug "Starting profile: $profile"
|
debug "Starting profile: $profile"
|
||||||
[[ ! ${!profile@a} = A ]] && echo "Profile '$profile' does not exist" && return 1
|
[[ ! ${!profile@a} = A ]] && echo "Profile '$profile' does not exist" && return 1
|
||||||
# Hold profile settings (from config file) in P_ARR
|
|
||||||
declare -gn P_ARR="$profile"
|
|
||||||
|
|
||||||
# Fallback to SCRIPTDIR if BUILDROOT has not been set
|
# Hold profile settings (from config file) in P_ARR
|
||||||
declare -g BUILDROOT="${BUILDROOT:=$SCRIPTDIR}"
|
declare -gn P_ARR="$profile"
|
||||||
declare -g FILESDIR="${FILESDIR:=$BUILDROOT/files}"
|
|
||||||
|
|
||||||
# precedence: user input>profile>env>hardcode
|
# precedence: user input>profile>env>hardcode
|
||||||
declare -g RELEASE="${USER_RELEASE:=${P_ARR[release]:=$RELEASE}}"
|
declare -g RELEASE="${USER_RELEASE:=${P_ARR[release]:=$RELEASE}}"
|
||||||
|
|||||||
Reference in New Issue
Block a user