Commit abf117c3 by Natanael Copa Committed by Stéphane Graber

lxc-alpine: use yaml for detection of latest release

Alpine Linux provides yaml files with latest release instead of the old approach with .latest.txt. Signed-off-by: 's avatarNatanael Copa <ncopa@alpinelinux.org> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent afc55ed2
...@@ -28,10 +28,15 @@ get_static_apk () { ...@@ -28,10 +28,15 @@ get_static_apk () {
if [ -z "$repository" ]; then if [ -z "$repository" ]; then
url=http://wiki.alpinelinux.org/cgi-bin/dl.cgi url=http://wiki.alpinelinux.org/cgi-bin/dl.cgi
yaml_path="latest-stable/releases/$apk_arch/latest-releases.yaml"
if [ -z "$release" ]; then if [ -z "$release" ]; then
echo -n "Determining the latest release... " echo -n "Determining the latest release... "
release=$($wget $url/.latest.$apk_arch.txt | \ release=$($wget $url/$yaml_path | \
cut -d " " -f 3 | cut -d / -f 1 | uniq) awk '$1 == "branch:" {print $2; exit 0}')
if [ -z "$release" ]; then
release=$($wget $url/.latest.$apk_arch.txt | \
cut -d " " -f 3 | cut -d / -f 1 | uniq)
fi
if [ -z "$release" ]; then if [ -z "$release" ]; then
echo failed echo failed
return 1 return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment