summaryrefslogtreecommitdiffstats
path: root/share/scripts/curl
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/curl')
-rwxr-xr-xshare/scripts/curl12
1 files changed, 11 insertions, 1 deletions
diff --git a/share/scripts/curl b/share/scripts/curl
index 6602a6f..0bcfd01 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -136,8 +136,18 @@ then
exit 1
fi
+if [ -x /usr/bin/lzip ]
+then
+ COMPRESSION="lz"
+elif [ -x /usr/bin/xz ]
+then
+ COMPRESSION="xz"
+else
+ COMPRESSION="gz"
+fi
+
ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
-IMAGE="${IMAGE:-debian-stretch-${ARCHITECTURE}.tar.xz}"
+IMAGE="${IMAGE:-debian-stretch-${ARCHITECTURE}.tar.${COMPRESSION}}"
SERVER="${SERVER:-https://files.open-infrastructure.net/system/container/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"