aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/shell
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/software/shell')
-rwxr-xr-xreproduce/software/shell/configure.sh5
-rwxr-xr-xreproduce/software/shell/tarball-prepare.sh26
2 files changed, 23 insertions, 8 deletions
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh
index 857f3b5..f226ced 100755
--- a/reproduce/software/shell/configure.sh
+++ b/reproduce/software/shell/configure.sh
@@ -1612,11 +1612,11 @@ fi
# which will download the DOI-resolved webpage, and extract the Zenodo-URL
# of the most recent version from there (using the 'coreutils' tarball as
# an example, the directory part of the URL for all the other software are
-# the same). This is not done if the option '--debug' is used.
+# the same). This is not done if the options '--debug' or `--offline` are used.
zenodourl=""
user_backup_urls=""
zenodocheck=.build/software/zenodo-check.html
-if [ x$debug = x ]; then
+if [ x$debug = x ] && [ x$offline = x ]; then
if $downloader $zenodocheck https://doi.org/10.5281/zenodo.3883409; then
zenodourl=$(sed -n -e'/coreutils/p' $zenodocheck \
| sed -n -e'/http/p' \
@@ -1723,6 +1723,7 @@ fi
on_mac_os=$on_mac_os \
sys_cpath=$sys_cpath \
host_cc=$host_cc \
+ offline=$offline \
-j$numthreads
diff --git a/reproduce/software/shell/tarball-prepare.sh b/reproduce/software/shell/tarball-prepare.sh
index e12ff98..09e1c89 100755
--- a/reproduce/software/shell/tarball-prepare.sh
+++ b/reproduce/software/shell/tarball-prepare.sh
@@ -159,12 +159,19 @@ for f in $allfiles; do
name=$(echo $(basename $f) \
| sed -e 's/.tar.*//' -e's/_/-/')
+ # Lzip will not be available to unpack Lzip itself, so just use Tar.
+ if [[ $name =~ ^lzip ]]; then
+ outname=$name.tar
+ else
+ outname=$name.tar.lz
+ fi
+
# Skip previously packed files
- if [ -f $odir/$name.tar.lz ]; then
+ if [ -f $odir/$outname ]; then
# Print the info message if not in quiet mode
if [ -z $quiet ]; then
- echo "$scriptname: $odir/$name.tar.lz: already present in output directory"
+ echo "$scriptname: $odir/$outname: already present in output directory"
fi
# skip this file
@@ -206,19 +213,26 @@ for f in $allfiles; do
# Put the current date on all the files because some packagers will not
# add dates to their release tarballs, resulting in dates of the
# Unix-time zero'th second (1970-01-01 at 00:00:00)!
- touch $(find "$name"/ -type f)
+ # -print0 is needed for those tarballs that has paths with spaces. For
+ # the same reason it's needed also `xargs -0`. (`xargs` is needed also
+ # for large tarballs such as gcc's)
+ find "$name"/ -type f -print0 | xargs -0 touch
# Pack with recommended options
tar -c -Hustar --owner=root --group=root \
-f $name.tar $name/
- lzip -9 $name.tar
+
+ # Lzip will not be available when unpacking Lzip, so we just use Tar.
+ if [[ ! $name =~ ^lzip ]]; then
+ lzip -9 $name.tar
+ fi
# Move the compressed file from the temporary directory to the target
# output directory
- mv $name.tar.lz $odir/
+ mv $outname $odir/
# Print the sha512sum along with the filename for a quick reference
- echo $(sha512sum $odir/$name.tar.lz)
+ echo $(sha512sum $odir/$outname)
# Clean up the temporary directory
rm -rf $tmpdir