move script/*/* to script/

there are only two scripts under script/ now, and there
probably won't be many more. cbmk'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>
audit2-merge1
Leah Rowe 2024-05-11 06:22:56 +01:00 committed by Leah Rowe
parent 9084ab15ab
commit 541430016f
3 changed files with 7 additions and 9 deletions

16
build
View File

@ -14,13 +14,12 @@ fi
. "include/option.sh" . "include/option.sh"
eval "$(setvars "" option aur_notice vdir relname src_dirname srcdir _xm \ eval "$(setvars "" script_path aur_notice vdir relname src_dirname srcdir \
target romdir mode)" _xm target romdir mode)"
err="fail" err="fail"
linkpath="${0}" linkpath="${0}"
linkname="${linkpath##*/}" linkname="${linkpath##*/}"
buildpath="./script/${linkname}"
main() main()
{ {
@ -43,11 +42,11 @@ initcmd()
case "${1}" in case "${1}" in
help) usage ${0} ;; help) usage ${0} ;;
list) items "${buildpath}" ;; list) items "script" ;;
version) mkversion ;; version) mkversion ;;
release) shift 1; mkrelease $@ ;; release) shift 1; mkrelease $@ ;;
*) *)
option="${1}" script_path="script/${1}"
return 0 ;; return 0 ;;
esac esac
cbmk_exit 0 cbmk_exit 0
@ -90,9 +89,8 @@ git_init()
excmd() excmd()
{ {
cbmkcmd="${buildpath}/${option}" [ -f "${script_path}" ] || $err "Bad command. Run: ${linkpath} help"
[ -f "${cbmkcmd}" ] || $err "Invalid command. Run: ${linkpath} help" shift 1; "$script_path" $@ || $err "excmd: ${script_path} ${@}"
shift 1; "$cbmkcmd" $@ || $err "excmd: ${cbmkcmd} ${@}"
} }
usage() usage()
@ -104,7 +102,7 @@ usage()
USAGE: ${progname} <OPTION> USAGE: ${progname} <OPTION>
possible values for 'OPTION': possible values for 'OPTION':
$(items "${buildpath}") $(items "script")
Special commands (consult $projectname documentation): Special commands (consult $projectname documentation):
./update release ./update release