summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-08-07 20:08:04 +0100
committerChris Lamb <chris@chris-lamb.co.uk>2008-08-07 20:10:48 +0100
commit15ee6f0eaeb05c0778a02f474f7fbda2027b42c8 (patch)
treef0fcf626ceedc75308d348abf1438f0703600216 /helpers
parent1376d237dcb3f54b3d9f3f27f1e251704086717c (diff)
downloadvyos-live-build-15ee6f0eaeb05c0778a02f474f7fbda2027b42c8.tar.gz
vyos-live-build-15ee6f0eaeb05c0778a02f474f7fbda2027b42c8.zip
Test whether to use hard-links when caching d-i downloads.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_debian-installer7
1 files changed, 6 insertions, 1 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index c0bb74c7f..e579eec28 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -216,7 +216,12 @@ Download_file () {
fi
fi
- cp -fl "${_LH_CACHE_FILE}" "${_LH_TARGET}"
+ if [ "$(stat --printf %d "${_LH_CACHE_DIR}")" = "$(stat --printf %d ./)" ]
+ then
+ CP_OPTIONS="-l"
+ fi
+
+ cp -f ${CP_OPTIONS} -- "${_LH_CACHE_FILE}" "${_LH_TARGET}"
}
VMLINUZ_DI="vmlinuz"