From 1d77b08d11a459598975cd73a1c9539849c0d815 Mon Sep 17 00:00:00 2001 From: davidovski Date: Thu, 15 Sep 2022 23:44:18 +0100 Subject: Auto updated packages --- auto/update.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'auto') diff --git a/auto/update.sh b/auto/update.sh index 312d128..35a073f 100755 --- a/auto/update.sh +++ b/auto/update.sh @@ -40,7 +40,6 @@ get_source () { name=$1 ver=$2 - cp repo/$name/$name.xibuild /tmp/xibuild sed "s/PKG_VER=.*/PKG_VER=$ver/" repo/$name/$name.xibuild > /tmp/xibuild . /tmp/xibuild echo "$SOURCE" @@ -54,6 +53,9 @@ get_type () { "") echo "none" ;; + *pythonhosted.org*) + echo "pypi" + ;; *) echo "archive" ;; @@ -105,10 +107,18 @@ new_ver () { done } +save_ver () { + local name ver + name=$1 + ver=$2 + + 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") + "git"|"none"|"pypi") printf "${LIGHT_WHITE}skipped" ;; *) @@ -116,8 +126,10 @@ for pkg in $(ls repo); do new="$(new_ver $pkg)" [ "$cur" = "$new" ] && - printf "${LIGHT_WHITE}%s ${CHECKMARK}" "$cur" || - printf "${GREEN}%s > %s" "$cur" "$new" + printf "${LIGHT_WHITE}%s ${CHECKMARK}" "$cur" || { + printf "${GREEN}%s > %s" "$cur" "$new" + save_ver "$pkg" "$new" + } esac printf "\n" done -- cgit v1.2.1