diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build | 29 |
1 files changed, 12 insertions, 17 deletions
@@ -16,27 +16,32 @@ fi . "include/vendor.sh" . "include/mrc.sh" -eval `setvars "" vdir src_dirname srcdir mode xp` +eval `setvars "" vdir src_dirname srcdir mode xp ser` 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) + [ $# -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! } @@ -54,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" @@ -92,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" @@ -108,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\"" - ./build roms all || $err "$vdir: roms-all" - ./build roms serprog rp2040 || $err "$vdir: rp2040" - ./build roms serprog stm32 || $err "$vdir: stm32" + mk -b coreboot pico-serprog stm32-vserprog x_ mv bin ../roms ) || $err "can't build rom images" |