~dricottone/huttese-apk

c86c77a1d66ffff4c0a474a406baba4ddf89c55f — Drew DeVault 2 years ago 06fa4d3
pkgkit: allow overriding repository

For use building the edge repo
1 files changed, 12 insertions(+), 3 deletions(-)

M pkgkit
M pkgkit => pkgkit +12 -3
@@ 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"