Browse Source

Grab ISO from parent directory if it's there

tags/nilmbuntu-5
Jim Paris 7 years ago
parent
commit
1f5afcc566
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      extractiso.sh

+ 7
- 1
extractiso.sh View File

@@ -17,7 +17,13 @@ set -e
# download it if it doesn't exist
if ! [ -e ${ORIG} ] ; then
mkdir -p $(dirname ${ORIG})
wget -O "${ORIG}" "${ORIGURL}"
if [ -e $(dirname ${ORIG})/../$(basename ${ORIG}) ] ; then
# grab from parent directory
cp $(dirname ${ORIG})/../$(basename ${ORIG}) ${ORIG}
else
# grab from web
wget -O "${ORIG}" "${ORIGURL}"
fi
fi

# mount it


Loading…
Cancel
Save