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>audit2-merge1
parent
fbac2d8fe6
commit
525f5525d3
11
build
11
build
|
@ -14,7 +14,7 @@ fi
|
||||||
|
|
||||||
. "include/option.sh"
|
. "include/option.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"
|
err="fail"
|
||||||
|
|
||||||
linkpath="${0}"
|
linkpath="${0}"
|
||||||
|
@ -47,9 +47,7 @@ initcmd()
|
||||||
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 ;;
|
||||||
script_path="script/${1}"
|
|
||||||
return 0 ;;
|
|
||||||
esac
|
esac
|
||||||
xbmk_exit 0
|
xbmk_exit 0
|
||||||
}
|
}
|
||||||
|
@ -91,8 +89,9 @@ git_init()
|
||||||
|
|
||||||
excmd()
|
excmd()
|
||||||
{
|
{
|
||||||
[ -f "${script_path}" ] || $err "Bad command. Check $projectname docs."
|
spath="script/${1}"
|
||||||
shift 1; "$script_path" $@ || $err "excmd: ${script_path} ${@}"
|
[ -f "${spath}" ] || $err "Bad command. Check $projectname docs."
|
||||||
|
shift 1; "$spath" $@ || $err "excmd: ${spath} ${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
mkrelease()
|
mkrelease()
|
||||||
|
|
Loading…
Reference in New Issue