summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-16 11:23:22 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-16 11:23:22 +0100
commit5702f5a4dce161f631c4e0c2204d360290f8dfb4 (patch)
tree231be6e4076ac9f0c6c535e3e9c7ca8e3d0bdddb /build
parentb76a70c3f916b9fdb0b63fd2bd0ac48d3d36d0b9 (diff)
build: remove excmd() and simplify main()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'build')
-rwxr-xr-xbuild17
1 files changed, 7 insertions, 10 deletions
diff --git a/build b/build
index 4c98e901..d4d5e520 100755
--- a/build
+++ b/build
@@ -26,6 +26,7 @@ main()
{
x_ id -u 1>/dev/null 2>/dev/null
[ $# -lt 1 ] && $err "Check $projectname documentation for help."
+ spath="script/$1"
[ "$1" = "dependencies" ] && x_ install_packages $@ && xbmk_exit 0
@@ -36,9 +37,12 @@ main()
git config --global user.email 1>/dev/null 2>/dev/null || \
git_err "git config --global user.email \"john.doe@example.com\""
- for cmd in initcmd git_init excmd; do
- eval "${cmd} \$@"
- done
+ initcmd $@
+ git_init
+
+ [ -f "${spath}" ] || $err "Bad command. Check $projectname docs."
+ shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}"
+
xbmk_exit 0
}
@@ -92,13 +96,6 @@ git_init()
$err "${PWD}: cannot git-tag ${projectname}/${version}"
}
-excmd()
-{
- spath="script/${1}"
- [ -f "${spath}" ] || $err "Bad command. Check $projectname docs."
- shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}"
-}
-
mkrelease()
{
export XBMK_RELEASE="y"