diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -1,8 +1,6 @@ #!/usr/bin/env sh # SPDX-License-Identifier: GPL-3.0-or-later -# Copyright (c) 2014-2015,2020-2024 Leah Rowe <leah@libreboot.org> -# Copyright (c) 2015 Patrick "P. J." McDermott <pj@pehjota.net> -# Copyright (c) 2015-2016 Klemens Nanni <contact@autoboot.org> +# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org> # Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com> set -u -e @@ -16,7 +14,7 @@ fi . "include/vendor.sh" . "include/mrc.sh" -eval `setvars "" vdir src_dirname srcdir mode xp ser` +eval "`setvars "" vdir src_dirname srcdir mode xp ser`" err="fail" main() @@ -25,23 +23,23 @@ main() spath="script/$1"; shcmd="shift 1" [ "${1#-*}" != "$1" ] && spath="script/trees" && shcmd=":" - for g in "which git" "git config --global user.name" \ + for g in "command -v git" "git config --global user.name" \ "git config --global user.email" "git_init"; do eval "$g 1>/dev/null 2>/dev/null || $err \"Unconfigured: $g\"" done 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 $@ ;; + 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 $@ ;; + shift 1; x_ ./mk -b coreboot "$@" ;; *) [ -f "$spath" ] || $err "bad command" - $shcmd; "$spath" $@ || $err "excmd: $spath $(echo "$@")" ;; + $shcmd; "$spath" "$@" || $err "excmd: $spath $(echo "$@")" ;; esac set -u -e # some commands disable them. turn them on! } @@ -50,7 +48,7 @@ git_init() { [ -L ".git" ] && return 1 [ -e ".git" ] && return 0 - eval `setvars "$(date -Rud @$versiondate)" cdate _nogit` + eval "`setvars "$(date -Rud @$versiondate)" cdate _nogit`" git init || return 1 git add -A . || return 1 @@ -128,5 +126,5 @@ tmp_cleanup() rm -f lock || return 1 } -main $@ +main "$@" tmp_cleanup || err_ "can't rm TMPDIR upon non-zero exit: $TMPDIR" |