summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTilman Blumenbach2015-08-13 21:08:26 +0200
committerTilman Blumenbach2015-08-13 21:08:26 +0200
commitf7bbbe6ab2ebb8bdf4667d969e3d6293c2736632 (patch)
treeca4832f997a7810ebc5ea87aad9a945993d89b28
parent92a783e9511a0a70c5d5d213c04a74451dcec7d4 (diff)
downloadaur-f7bbbe6ab2ebb8bdf4667d969e3d6293c2736632.tar.gz
Only redownload data file if necessary.
-rw-r--r--PKGBUILD11
1 files changed, 10 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bde217ce0f32..79c3a992eea3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -33,8 +33,17 @@ pkgver()
prepare()
{
+ # Okay, this may not be the ideal place to download the data file,
+ # but we DO want to update it on every run -- if we let makepkg
+ # download it for us, it will not be re-downloaded if it already
+ # exists locally (and that would be bad since the data file could
+ # have been updated on the server since the last download).
+ #
+ # Instead, we instruct curl to only download the file if it is
+ # newer than the local copy (if it exists).
+
msg2 "Downloading data file..."
- curl -fL -o "${srcdir}/bofh-excuses.raw" "${_dlurl}"
+ curl -fL -Ro "${srcdir}/bofh-excuses.raw" -z "${srcdir}/bofh-excuses.raw" "${_dlurl}"
}
build()