From afc81afd48f40fd0ce050c47f363be20bb1e5286 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 12 Oct 2023 09:10:33 +0200 Subject: [PATCH] replace opttargetdir with _TARGET_DIR --- usr/bin/archboot-cpio.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr/bin/archboot-cpio.sh b/usr/bin/archboot-cpio.sh index 325575c21..dc509f624 100755 --- a/usr/bin/archboot-cpio.sh +++ b/usr/bin/archboot-cpio.sh @@ -14,7 +14,7 @@ _CONFIG="" _INITCPIO=/lib/initcpio/install # options and runtime data _GENERATE_IMAGE="" -_opttargetdir='' +_TARGET_DIR="" declare -A _addedmodules _modpaths # Sanitize environment further # GREP_OPTIONS="--color=always" will break everything @@ -144,7 +144,7 @@ while :; do ;; -d) shift - _opttargetdir="$1" + ${_TARGET_DIR}="$1" ;; -g) shift @@ -182,8 +182,8 @@ fi _KERNELVERSION="$(_kver "${KERNEL}")" _d_kmoduledir="/lib/modules/${_KERNELVERSION}" [[ -d "$_d_kmoduledir" ]] || die "'$_d_kmoduledir' is not a valid kernel module directory" -_d_workdir="$(initialize_buildroot "${_KERNELVERSION}" "$_opttargetdir")" || exit 1 -BUILDROOT="${_opttargetdir:-$_d_workdir/root}" +_d_workdir="$(initialize_buildroot "${_KERNELVERSION}" "${_TARGET_DIR}")" || exit 1 +BUILDROOT="${_TARGET_DIR}:-$_d_workdir/root}" _hooks=("${HOOKS[@]}") if (( ${#_hooks[*]} == 0 )); then die "Invalid config: No hooks found" @@ -196,7 +196,7 @@ if [[ -n "${_GENERATE_IMAGE}" ]]; then die "Unable to write to '%s'" "${_GENERATE_IMAGE}" fi msg "Starting build: '%s'" "${_KERNELVERSION}" -elif [[ -n "$_opttargetdir" ]]; then +elif [[ -n "${_TARGET_DIR}" ]]; then msg "Starting build: '%s'" "${_KERNELVERSION}" else msg "Starting dry run: '%s'" "${_KERNELVERSION}" @@ -214,7 +214,7 @@ rm -f -- "$BUILDROOT/var/cache/ldconfig/aux-cache" umask 077 if [[ -n "${_GENERATE_IMAGE}" ]]; then build_image "${_GENERATE_IMAGE}" "${COMPRESSION}" || exit 1 -elif [[ -n "$_opttargetdir" ]]; then +elif [[ -n "${_TARGET_DIR}" ]]; then msg "Build complete." else msg "Dry run complete, use -g IMAGE to generate a real image"