aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-06-03 21:03:00 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-06-03 21:03:00 +0100
commitd85dfdf8d7b0f2769d824fd4994eccec55db963a (patch)
tree93afba26310a300fe834ed5a74258ba0353fc862 /reproduce/analysis
parentfc9bdf8d3793ffdb4168ca5c5c7ed97bbd5ab036 (diff)
parenta69f2ce5624b0b683b793a2f4cb68c7023458f15 (diff)
Imported recent updated in Maneage, minor conflict fixed
The minor conflict was with 'reproduce/software/make/high-level.mk', and in particular because we implemented the fix to Maneage's Task #15664 in this project first. After it was moved to the main Maneage branch some minor stylistic corrections were done to it, thus causing the conflict. To resolve the conflict, I simply imported the full Maneage version of the file with this command: git checkout maneage -- reproduce/software/make/high-level.mk The other conflicts were due to the deleted files (that were resolved as described in 'README-hacking.md') and the LaTeX files that I had told '.gitattributes' to ignore from the Maneage branch.
Diffstat (limited to 'reproduce/analysis')
-rwxr-xr-xreproduce/analysis/bash/download-multi-try76
-rw-r--r--reproduce/analysis/make/download.mk19
-rw-r--r--reproduce/analysis/make/initialize.mk19
-rw-r--r--reproduce/analysis/make/paper.mk19
-rw-r--r--reproduce/analysis/make/prepare.mk19
-rw-r--r--reproduce/analysis/make/top-make.mk21
-rw-r--r--reproduce/analysis/make/top-prepare.mk19
-rw-r--r--reproduce/analysis/make/verify.mk19
8 files changed, 123 insertions, 88 deletions
diff --git a/reproduce/analysis/bash/download-multi-try b/reproduce/analysis/bash/download-multi-try
index 4136df4..e4ccd26 100755
--- a/reproduce/analysis/bash/download-multi-try
+++ b/reproduce/analysis/bash/download-multi-try
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Attempt downloading multiple times before crashing whole project. From
# the top project directory (for the shebang above), this script must be
@@ -28,15 +28,18 @@
#
# Copyright (C) 2019-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This script is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -87,50 +90,61 @@ counter=0
maxcounter=10
while [ ! -f "$outname" ]; do
- # Increment the counter. We need the `counter=' part here because
- # without it the evaluation of arithmetic expression will be like and
- # error and the script is set to crash on errors.
- counter=$((counter+1))
+ # Increment the counter.
+ counter=$(echo $counter | awk '{print $1+1}')
# If we have passed a maximum number of trials, just exit with
# a failed code.
- if (( counter > maxcounter )); then
- echo
+ reachedmax=$(echo $counter \
+ | awk '{if($1>'$maxcounter') print "yes"; else print "no";}')
+ if [ x$reachedmax = xyes ]; then
+ echo ""
echo "Failed $maxcounter download attempts: $outname"
- echo
+ echo ""
exit 1
fi
# If this isn't the first attempt print a notice and wait a little for
# the next trail.
- if (( counter > 1 )); then
- tstep=$((counter*5))
+ if [ x$counter = x1 ]; then
+ just_a_place_holder=1
+ else
+ tstep=$(echo $counter | awk '{print $1*5}')
echo "Download trial $counter for '$outname' in $tstep seconds."
sleep $tstep
fi
- # Attempt downloading the file (one-at-a-time). Note that the
- # `downloader' ends with the respective option to specify the output
- # name. For example "wget -O" (so `outname', that comes after it) will
- # be the name of the downloaded file.
+ # Attempt downloading the file. Note that the `downloader' ends with
+ # the respective option to specify the output name. For example "wget
+ # -O" (so `outname', that comes after it) will be the name of the
+ # downloaded file.
if [ x"$lockfile" = xnolock ]; then
if ! $downloader $outname $inurl; then rm -f $outname; fi
else
# Try downloading from the requested URL.
- flock "$lockfile" bash -c \
+ flock "$lockfile" sh -c \
"if ! $downloader $outname $inurl; then rm -f $outname; fi"
+ fi
- # If it failed, try the backup server(s).
- if [ ! -f "$outname" ]; then
- if [ x"$backupservers" != x ]; then
- for bs in "$backupservers"; do
- flock "$lockfile" bash -c \
+ # If the download failed, try the backup server(s).
+ if [ ! -f "$outname" ]; then
+ if [ x"$backupservers" != x ]; then
+ for bs in $backupservers; do
+
+ # Use this backup server.
+ if [ x"$lockfile" = xnolock ]; then
+ if ! $downloader $outname $bs/$urlfile; then rm -f $outname; fi
+ else
+ flock "$lockfile" sh -c \
"if ! $downloader $outname $bs/$urlfile; then rm -f $outname; fi"
- done
- fi
+ fi
+
+ # If the file was downloaded, break out of the loop that
+ # parses over the backup servers.
+ if [ -f "$outname" ]; then break; fi
+ done
fi
fi
-
done
diff --git a/reproduce/analysis/make/download.mk b/reproduce/analysis/make/download.mk
index 795cb0e..8d9c164 100644
--- a/reproduce/analysis/make/download.mk
+++ b/reproduce/analysis/make/download.mk
@@ -7,15 +7,18 @@
#
# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This Makefile is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk
index 24f74ec..fe9c103 100644
--- a/reproduce/analysis/make/initialize.mk
+++ b/reproduce/analysis/make/initialize.mk
@@ -2,15 +2,18 @@
#
# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This Makefile is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.
diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk
index 08fd766..cc43117 100644
--- a/reproduce/analysis/make/paper.mk
+++ b/reproduce/analysis/make/paper.mk
@@ -2,15 +2,18 @@
#
# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This Makefile is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.
diff --git a/reproduce/analysis/make/prepare.mk b/reproduce/analysis/make/prepare.mk
index 9f80afe..0391956 100644
--- a/reproduce/analysis/make/prepare.mk
+++ b/reproduce/analysis/make/prepare.mk
@@ -2,15 +2,18 @@
#
# Copyright (C) 2019-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This Makefile is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.
diff --git a/reproduce/analysis/make/top-make.mk b/reproduce/analysis/make/top-make.mk
index 07e8aa8..55b1f43 100644
--- a/reproduce/analysis/make/top-make.mk
+++ b/reproduce/analysis/make/top-make.mk
@@ -2,15 +2,18 @@
#
# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This Makefile is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
-#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.
diff --git a/reproduce/analysis/make/top-prepare.mk b/reproduce/analysis/make/top-prepare.mk
index 79b976f..0f4f124 100644
--- a/reproduce/analysis/make/top-prepare.mk
+++ b/reproduce/analysis/make/top-prepare.mk
@@ -6,15 +6,18 @@
#
# Copyright (C) 2019-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This Makefile is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.
diff --git a/reproduce/analysis/make/verify.mk b/reproduce/analysis/make/verify.mk
index 117b325..088b3b3 100644
--- a/reproduce/analysis/make/verify.mk
+++ b/reproduce/analysis/make/verify.mk
@@ -2,15 +2,18 @@
#
# Copyright (C) 2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
-# This file is part of Maneage. Maneage is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# This Makefile is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# Maneage is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details. See <http://www.gnu.org/licenses/>.
+# This Makefile is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this Makefile. If not, see <http://www.gnu.org/licenses/>.