aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/software/make/build-rules.mk9
-rwxr-xr-xreproduce/software/shell/pre-make-build.sh14
2 files changed, 18 insertions, 5 deletions
diff --git a/reproduce/software/make/build-rules.mk b/reproduce/software/make/build-rules.mk
index 86370ab..d50c301 100644
--- a/reproduce/software/make/build-rules.mk
+++ b/reproduce/software/make/build-rules.mk
@@ -44,7 +44,12 @@ import-source = final=$(tdir)/$$tarball; \
unchecked="$$final.unchecked"; \
rm -f "$$unchecked"; \
if [ -f $(DEPENDENCIES-DIR)/$$tarball ]; then \
- cp $(DEPENDENCIES-DIR)/$$tarball "$$unchecked"; \
+ if type realpath > /dev/null 2> /dev/null; then \
+ ln -sf "$$(realpath $(DEPENDENCIES-DIR)/$$tarball)" \
+ "$$unchecked"; \
+ else \
+ cp $(DEPENDENCIES-DIR)/$$tarball "$$unchecked"; \
+ fi; \
else \
if [ x"$$url" = x ]; then \
bservers="$(backupservers)"; \
@@ -70,7 +75,7 @@ import-source = final=$(tdir)/$$tarball; \
if [ x"$$checksum" = x"$$exp_checksum" ]; then \
mv "$$unchecked" "$$final"; \
else \
- echo "ERROR: Non-matching checksum for '$$tarball'."; \
+ echo "ERROR: Non-matching checksum: $$tarball"; \
echo "Checksum should be: $$exp_checksum"; \
echo "Checksum is: $$checksum"; \
exit 1; \
diff --git a/reproduce/software/shell/pre-make-build.sh b/reproduce/software/shell/pre-make-build.sh
index 05a4143..9188fc9 100755
--- a/reproduce/software/shell/pre-make-build.sh
+++ b/reproduce/software/shell/pre-make-build.sh
@@ -104,9 +104,17 @@ download_tarball() {
tarballurl=$url/$tarball
fi
- # See if it is in the input software directory.
+ # See if it is in the input-software directory, if so, make a link, if
+ # not copy it. The only issue is that the file in the input-software
+ # directory may actually be a link itself. So to avoid complications
+ # with many links, we'll use 'realpath' (if it exists) to parse the
+ # link and link to an actual file.
if [ -f "$ddir/$tarball" ]; then
- cp $ddir/$tarball $ucname
+ if type realpath > /dev/null 2> /dev/null; then
+ ln -sf "$(realpath $ddir/$tarball)" "$ucname"
+ else
+ cp $ddir/$tarball $ucname
+ fi
else
$downloadwrapper "$downloader" nolock $tarballurl $ucname \
"$bservers"
@@ -118,7 +126,7 @@ download_tarball() {
expectedchecksum=$(awk '/^'$progname'-checksum/{print $3}' $checksumsfile)
if [ x$checksum = x$expectedchecksum ]; then mv "$ucname" "$maneagetar"
else
- echo "ERROR: Non-matching checksum for '$tarball'."
+ echo "ERROR: Non-matching checksum: $tarball"
echo "Checksum should be: $expectedchecksum"
echo "Checksum is: $checksum"
exit 1