diff options
author | davidovski <david@davidovski.xyz> | 2022-09-15 23:44:18 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-09-15 23:44:18 +0100 |
commit | 1d77b08d11a459598975cd73a1c9539849c0d815 (patch) | |
tree | bbf56956692a6598e6da1c9c8cacb380706578c2 /auto | |
parent | 24998e21676efbd0801bb9a56d167eaf273d44d7 (diff) |
Auto updated packages
Diffstat (limited to 'auto')
-rwxr-xr-x | auto/update.sh | 20 |
1 files changed, 16 insertions, 4 deletions
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 |