diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build | 31 |
1 files changed, 10 insertions, 21 deletions
@@ -22,27 +22,26 @@ err="fail" main() { [ $# -lt 1 ] && $err "bad command" - spath="script/$1" + spath="script/$1"; shcmd="shift 1" + [ "${1#-*}" != "$1" ] && spath="script/trees" && shcmd=":" for g in "which git" "git config --global user.name" \ "git config --global user.email" "git_init"; do - eval "$g 1>/dev/null 2>/dev/null || git_err \"$g\"" + eval "$g 1>/dev/null 2>/dev/null || $err \"Unconfigured: $g\"" done - case "${1}" in + case "${spath#script/}" in version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;; release) shift 1; mkrelease $@ ;; inject) shift 1; vendor_inject $@ ;; download) shift 1; vendor_download $@ ;; roms) - if [ $# -gt 1 ] && [ "$2" = "serprog" ]; then - x_ ./update trees -b stm32-vserprog - x_ ./update trees -b pico-serprog; return 0 - fi; shift 1 - x_ ./update trees -b coreboot $@ ;; + [ $# -gt 1 ] && [ "$2" = "serprog" ] && \ + mk -b stm32-vserprog pico-serprog && return 0 + shift 1; x_ ./mk -b coreboot $@ ;; *) [ -f "$spath" ] || $err "bad command" - shift 1; "$spath" $@ || $err "excmd: $spath $@" ;; + $shcmd; "$spath" $@ || $err "excmd: $spath $(echo "$@")" ;; esac set -u -e # some commands disable them. turn them on! } @@ -60,12 +59,6 @@ git_init() git tag -a "$version" -m "$projectname $version" || return 1 } -git_err() -{ - printf "You need to set git name/email, like so:\n%s\n\n" "$1" 1>&2 - $err "Git name/email not configured" -} - mkrelease() { export XBMK_RELEASE="y" @@ -98,8 +91,7 @@ build_release() { ( cd "$srcdir" || $err "$vdir: !cd \"$srcdir\"" - ./update trees -f - rmgit . + ./mk -f; x_ rm -Rf tmp; rmgit . x_ mv src/docs docs ) || $err "can't create release files" @@ -114,12 +106,9 @@ build_release() [ "$mode" = "src" ] && return 0 touch "$srcdir/lock" || $err "can't make lock file in $srcdir/" - ( cd "$srcdir" || $err "$vdir: 2 !cd \"$srcdir\"" - ./update trees -b coreboot || $err "$vdir: roms-all" - ./update trees -b pico-serprog || $err "$vdir: rp2040" - ./update trees -b stm32-vserprog || $err "$vdir: stm32" + mk -b coreboot pico-serprog stm32-vserprog pcsx-redux x_ mv bin ../roms ) || $err "can't build rom images" |