diff options
author | Leah Rowe <leah@libreboot.org> | 2023-10-03 12:59:35 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-10-03 12:59:49 +0100 |
commit | 5de8eda21c61fd7e1cf6b7e4ec6c9d98dae3e365 (patch) | |
tree | aa0099feff1f80fece4ce4efe16caa74ef905097 /script/build/fw | |
parent | 334aa1f7c985e86bd6f0302dbf404927cbb8a19e (diff) |
general code cleanup in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/build/fw')
-rwxr-xr-x | script/build/fw/serprog | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/script/build/fw/serprog b/script/build/fw/serprog index cdbf07e1..222d7751 100755 --- a/script/build/fw/serprog +++ b/script/build/fw/serprog @@ -20,22 +20,21 @@ main() if [ "${1}" = "rp2040" ]; then platform="rp2040" boards_dir=${pico_sdk_dir}/src/boards/include/boards - [ -d "${pico_src_dir}/" ] || fetch_repo rpi-pico-serprog + [ -d "${pico_src_dir}/" ] || \ + x_ ./update project repo "rpi-pico-serprog" elif [ "${1}" = "stm32" ]; then platform="stm32" boards_dir=${stm32_src_dir}/boards - [ -d "${stm32_src_dir}/" ] || fetch_repo stm32-vserprog + [ -d "${stm32_src_dir}/" ] || \ + x_ ./update project repo "stm32-vserprog" else err "${usage}" fi x_ mkdir -p "bin/serprog_${platform}" if [ $# -gt 1 ] ; then - if [ "${2}" = "list" ] ; then - print_boards ${boards_dir} - else - build_${platform}_rom "${2}" - fi + [ "${2}" = "list" ] && print_boards ${boards_dir} && return 0 + build_${platform}_rom "${2}" else printf "Building all serprog targets\n" list_boards "${boards_dir}" | while read board; do @@ -44,11 +43,6 @@ main() fi } -fetch_repo() -{ - x_ ./update project repo "${1}" -} - build_rp2040_rom() { board=${1} |