summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-16 11:11:25 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-16 11:11:59 +0100
commitb76a70c3f916b9fdb0b63fd2bd0ac48d3d36d0b9 (patch)
treeb828c2076ca89b9cc0535ed714c0bf00ffd1d76d
parent839ef680cd8f25650d8fb59a3e6fe6bf3f84786b (diff)
build: don't make script_path a global variable
this allows a mild cleanup of the code (reduction by 1 line) Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xbuild11
1 files changed, 5 insertions, 6 deletions
diff --git a/build b/build
index b6311846..4c98e901 100755
--- a/build
+++ b/build
@@ -16,7 +16,7 @@ fi
. "include/vendor.sh"
. "include/mrc.sh"
-eval "$(setvars "" script_path aur_notice vdir src_dirname srcdir _xm mode xp)"
+eval "$(setvars "" aur_notice vdir src_dirname srcdir _xm mode xp)"
err="fail"
linkpath="${0}"
@@ -51,9 +51,7 @@ initcmd()
release) shift 1; mkrelease $@ ;;
inject) shift 1; vendor_inject $@ ;;
download) shift 1; vendor_download $@ ;;
- *)
- script_path="script/${1}"
- return 0 ;;
+ *) return 0 ;;
esac
set -u -e # some commands disable them. turn them on!
xbmk_exit 0
@@ -96,8 +94,9 @@ git_init()
excmd()
{
- [ -f "${script_path}" ] || $err "Bad command. Check $projectname docs."
- shift 1; "$script_path" $@ || $err "excmd: ${script_path} ${@}"
+ spath="script/${1}"
+ [ -f "${spath}" ] || $err "Bad command. Check $projectname docs."
+ shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}"
}
mkrelease()