build: remove excmd() and simplify main()
Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
525f5525d3
commit
571932d33e
17
build
17
build
|
@ -24,6 +24,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
|
||||
|
||||
|
@ -34,9 +35,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
|
||||
}
|
||||
|
||||
|
@ -87,13 +91,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"
|
||||
|
|
Loading…
Reference in New Issue