build: remove initcmd() and simplify main()
Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
f2b3bb142d
commit
e4956478db
14
build
14
build
|
@ -36,22 +36,14 @@ main()
|
||||||
git_err "git config --global user.email \"john.doe@example.com\""
|
git_err "git config --global user.email \"john.doe@example.com\""
|
||||||
git_init
|
git_init
|
||||||
|
|
||||||
initcmd $@
|
|
||||||
|
|
||||||
[ -f "${spath}" ] || $err "Bad command. Check $projectname docs."
|
|
||||||
shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}"
|
|
||||||
|
|
||||||
xbmk_exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
initcmd()
|
|
||||||
{
|
|
||||||
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
version) printf "%s\n" "$relname" ;;
|
version) printf "%s\n" "$relname" ;;
|
||||||
release) shift 1; mkrelease $@ ;;
|
release) shift 1; mkrelease $@ ;;
|
||||||
*) return 0 ;;
|
*)
|
||||||
|
[ -f "${spath}" ] || $err "Bad command. Check docs."
|
||||||
|
shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}" ;;
|
||||||
esac
|
esac
|
||||||
xbmk_exit 0
|
xbmk_exit 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue