summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-11 06:22:56 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-11 06:26:52 +0100
commitd7ce26dc23ccd797bd4cb904c378ee6dc701f42b (patch)
treecceba4a7239fa21f1148613a18e5e3557dddf7cd /build
parent029291e5495bf679cb36a7500b73ff9fa1dfff35 (diff)
move script/*/* to script/
there are only two scripts under script/ now, and there probably won't be many more. lbmk's design has simplified to such a degree that the two-level directory structure is no longer necessary. the existing command structure has not changed. for example: ./build roms list ./update trees -f coreboot default these will still work, but the symlinks to "build" are now strictly for backwards compatibility; they may be removed at a later date, but i'll keep the current design for now. this also leads to a quirk, for example: ./build roms all ./update roms all these now do the exact same thing, whereas "./update roms all" would have previously been an invalid command. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'build')
-rwxr-xr-xbuild16
1 files changed, 7 insertions, 9 deletions
diff --git a/build b/build
index 60877d8e..71620308 100755
--- a/build
+++ b/build
@@ -16,13 +16,12 @@ fi
. "include/vendor.sh"
. "include/mrc.sh"
-eval "$(setvars "" option aur_notice vdir relname src_dirname srcdir _xm \
- target romdir mode)"
+eval "$(setvars "" script_path aur_notice vdir relname src_dirname srcdir \
+ _xm target romdir mode)"
err="fail"
linkpath="${0}"
linkname="${linkpath##*/}"
-buildpath="./script/${linkname}"
main()
{
@@ -45,13 +44,13 @@ initcmd()
case "${1}" in
help) usage ${0} ;;
- list) items "${buildpath}" ;;
+ list) items "script" ;;
version) mkversion ;;
release) shift 1; mkrelease $@ ;;
inject) shift 1; vendor_inject $@ ;;
download) shift 1; vendor_download $@ ;;
*)
- option="${1}"
+ script_path="script/${1}"
return 0 ;;
esac
set -u -e # some commands disable them. turn them on!
@@ -95,9 +94,8 @@ git_init()
excmd()
{
- lbmkcmd="${buildpath}/${option}"
- [ -f "${lbmkcmd}" ] || $err "Invalid command. Run: ${linkpath} help"
- shift 1; "$lbmkcmd" $@ || $err "excmd: ${lbmkcmd} ${@}"
+ [ -f "${script_path}" ] || $err "Bad command. Run: ${linkpath} help"
+ shift 1; "$script_path" $@ || $err "excmd: ${script_path} ${@}"
}
usage()
@@ -109,7 +107,7 @@ usage()
USAGE: ${progname} <OPTION>
possible values for 'OPTION':
- $(items "${buildpath}")
+ $(items "script")
Special commands (consult $projectname documentation):
./vendor inject