diff options
author | Philip Hands <phil@hands.com> | 2016-06-13 21:14:38 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-06-16 22:33:02 +0200 |
commit | 2f788e3a92f4a36bf0a0114ea9ac80887dc541dd (patch) | |
tree | 3aece8c21926f0801a18e4d54645a49afab7d996 /bin | |
parent | aeaa9a36db9b482f51520f669ff086b639b7c3f3 (diff) | |
download | jenkins.debian.net-2f788e3a92f4a36bf0a0114ea9ac80887dc541dd.tar.xz |
lvc: hack to allow use of local images (FIXME for pb10)
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/lvc.sh | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -24,6 +24,11 @@ cleanup_all() { fetch_if_newer() { url="$2" file="$1" + if [ -f $url ] ; then + echo "the URL turns out to be a local path ($url) -- linking" + ln -sf $url $file + return + fi echo "Downloading $url" curlopts="-L -s -S" if [ -f "$file" ] ; then @@ -91,7 +96,7 @@ elif [ ! -z "$IMAGE" ] ; then # fetch_if_newer "$IMAGE" "$URL" # is this really an .iso? - if [ $(file "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then + if [ $(file -L "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then # yes, so let's md5sum and mount it md5sum $IMAGE # sudo mkdir -p $IMAGE_MNT |