@@ 176,7 176,6 @@ mirror_ver() (
;;
esac
done
- echo none
)
upload_pkg() (
@@ 184,19 183,20 @@ upload_pkg() (
pkg="$2"
arch="$(uname -m)"
+ set -x
path="$remote_path/$repo/$arch"
ssh "$remote" mkdir -p "$path"
url=$(echo "$remote" | cut -d@ -f2)
prev_ver=$(mirror_ver "$url" "$pkg")
- set -x
- if [ "$prev_ver" != "none" ]
- then
- prev_pkgver=$(printf "%s" "$prev_ver" | cut -d'-' -f1)
- prev_pkgrel=$(printf "%s" "$prev_ver" | cut -d'-' -f2 | cut -d'r' -f2-)
- ssh "$remote" rm -f "$path/$pkg-$prev_pkgver-r$prev_pkgrel.apk"
- fi
+ for ver in $prev_ver
+ do
+ if [ "$prev_ver" != "none" ]
+ then
+ ssh "$remote" rm -f "$path/$pkg-$ver.apk"
+ fi
+ done
pkgver="$(get_pkgvar pkgver)"
pkgrel="$(get_pkgvar pkgrel)"