@@ 208,12 208,21 @@ mirror_ver() (
done
)
+get_aver() {
+ aver="${REPOSITORY:-}"
+ if [ ${#REPOSITORY} -eq 0 ]
+ then
+ . /etc/os-release
+ aver="v$(printf "%s" "$VERSION_ID" | cut -d. -f1-2)"
+ fi
+ echo "$aver"
+}
+
upload_pkg() (
repo="$1"
pkg="$2"
arch="$(uname -m)"
- . /etc/os-release
- aver="v$(printf "%s" "$VERSION_ID" | cut -d. -f1-2)"
+ aver="$(get_aver)"
set -x
path="$remote_path/$aver/$repo/$arch"
@@ 242,7 251,7 @@ update_index() (
arch="$(uname -m)"
. /etc/os-release
- aver="v$(printf "%s" "$VERSION_ID" | cut -d. -f1-2)"
+ aver="$(get_aver)"
path="$remote_path/$aver/$repo/$arch"