From 5c163f0deb814c8a6e4e2155a5bbd3b6784f4088 Mon Sep 17 00:00:00 2001 From: James Swineson Date: Tue, 9 Apr 2019 17:59:37 +0800 Subject: [PATCH] update comments --- menhera.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/menhera.sh b/menhera.sh index 7cb612b..52c6ccd 100755 --- a/menhera.sh +++ b/menhera.sh @@ -26,7 +26,11 @@ confirm() { get_rootfs() { if [ -n ${ROOTFS} ]; then echo "Getting rootfs URL..." + + # forgive me for parsing HTML with these shit + # and hope it works ROOTFS_TIME=$(curl "https://uk.images.linuxcontainers.org/images/debian/stretch/amd64/default/?C=M;O=D" | grep "folder.gif" | head -n 1 | cut -d'>' -f7 | cut -d'/' -f1) + ROOTFS="https://images.linuxcontainers.org/images/debian/stretch/amd64/default/${ROOTFS_TIME}/rootfs.squashfs" else echo "\$ROOTFS is set to '$ROOTFS'"