aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/shell/pre-make-build.sh
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-08-17 00:28:08 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-08-20 02:00:32 +0100
commit3480a74b077f599389fd54a453791a0373568171 (patch)
tree76e472534d729301ad480e3777c91a7c24a5d331 /reproduce/software/shell/pre-make-build.sh
parentb79c430c82b6c3a40817caac13bf8665cfa9c6a3 (diff)
parent9573d4e4d4754e629b73be4bd6846a049d57f427 (diff)
Imported recent updates in Maneage, minor conflicts fixed
Some very minor conflicts came up and were easily corrected. They were mostly in parts that are also shared with the demonstration in the core Maneage branch.
Diffstat (limited to 'reproduce/software/shell/pre-make-build.sh')
-rwxr-xr-xreproduce/software/shell/pre-make-build.sh14
1 files changed, 11 insertions, 3 deletions
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