From 0d37a1ef234c38b27faba43bc3a22f985d311deb Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 17 May 2023 17:01:27 +0100 Subject: Remove all firmware --- auto/update.sh | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'auto') diff --git a/auto/update.sh b/auto/update.sh index 35a073f..474004b 100755 --- a/auto/update.sh +++ b/auto/update.sh @@ -115,23 +115,25 @@ save_ver () { sed -i "s/PKG_VER=.*/PKG_VER=$ver/" repo/$name/$name.xibuild } -for pkg in $(ls repo); do - printf "${LIGHT_BLUE}%s " "$pkg" - case "$(get_type $pkg)" in - "git"|"none"|"pypi") - printf "${LIGHT_WHITE}skipped" - ;; - *) - cur="$(cur_ver $pkg)" - new="$(new_ver $pkg)" - - [ "$cur" = "$new" ] && - printf "${LIGHT_WHITE}%s ${CHECKMARK}" "$cur" || { - printf "${GREEN}%s > %s" "$cur" "$new" - save_ver "$pkg" "$new" - } - esac - printf "\n" -done - +update_pkg () { + for pkg in $@; do + printf "${LIGHT_BLUE}%s " "$pkg" + case "$(get_type $pkg)" in + "git"|"none"|"pypi") + printf "${LIGHT_WHITE}skipped" + ;; + *) + cur="$(cur_ver $pkg)" + new="$(new_ver $pkg)" + + [ "$cur" = "$new" ] && + printf "${LIGHT_WHITE}%s ${CHECKMARK}" "$cur" || { + printf "${GREEN}%s > %s" "$cur" "$new" + save_ver "$pkg" "$new" + } + esac + printf "\n" + done +} +[ -z "$*" ] && update_pkg $(ls repo) || update_pkg $@ -- cgit v1.2.1