diff options
author | Eric Hameleers <alien@slackware.com> | 2010-12-18 16:32:36 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2010-12-18 16:32:36 +0000 |
commit | ff7a8252802473eb2d7fc20eef081463989f29e5 (patch) | |
tree | c9a126dc111f524549493281927170745f40f2ee | |
parent | abbd434e48ab053eb6d0779e4ac121f75f12338c (diff) | |
download | asb-ff7a8252802473eb2d7fc20eef081463989f29e5.tar.gz asb-ff7a8252802473eb2d7fc20eef081463989f29e5.tar.xz |
Update the download routine to my current template
-rwxr-xr-x | dropbox-client/build/dropbox-client.SlackBuild | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dropbox-client/build/dropbox-client.SlackBuild b/dropbox-client/build/dropbox-client.SlackBuild index 7846b704..8b5c99dc 100755 --- a/dropbox-client/build/dropbox-client.SlackBuild +++ b/dropbox-client/build/dropbox-client.SlackBuild @@ -106,14 +106,15 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename ${SOURCE})" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" - echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then - echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." + echo "Fail to download '$(basename ${SOURCE})'. Aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 fi |