aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/shell
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/software/shell')
-rwxr-xr-xreproduce/software/shell/bashrc.sh52
-rwxr-xr-xreproduce/software/shell/configure.sh10
-rwxr-xr-xreproduce/software/shell/git-post-checkout2
-rwxr-xr-xreproduce/software/shell/git-pre-commit2
-rwxr-xr-xreproduce/software/shell/pre-make-build.sh4
-rwxr-xr-xreproduce/software/shell/run-parts.in4
-rwxr-xr-xreproduce/software/shell/tarball-prepare.sh18
7 files changed, 75 insertions, 17 deletions
diff --git a/reproduce/software/shell/bashrc.sh b/reproduce/software/shell/bashrc.sh
index 6bb871b..814de2c 100755
--- a/reproduce/software/shell/bashrc.sh
+++ b/reproduce/software/shell/bashrc.sh
@@ -28,8 +28,13 @@
# When doing the project's analysis: all software have known
# versions.
#
+# shell
+# -----
+# When the user has activated the interactive shell (with './project
+# shell').
#
-# Copyright (C) 2019-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+#
+# Copyright (C) 2019-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,3 +48,48 @@
#
# You should have received a copy of the GNU General Public License
# along with this script. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+
+
+# Interactive mode settings. We don't want these within the pipeline
+# because they are useless there (for example the introduction message or
+# prompt) and can un-necessarily slow down the running jobs (recall that
+# the shell is executed at the start of each recipe).
+if [ x$PROJECT_STATUS = xshell ]; then
+
+ # A small introductory message.
+ echo "----------------------------------------------------------------------"
+ echo "Welcome to the Maneage interactive shell for this project, running"
+ echo " $(sh --version | awk 'NR==1')"
+ echo
+ echo "This shell's home directory is the project's build directory:"
+ echo " HOME: $HOME"
+ echo
+ echo "This shell's startup file is in the project's source directory:"
+ echo " $PROJECT_RCFILE"
+ echo
+ echo "To return to your host shell, run the 'exit' command."
+ echo "----------------------------------------------------------------------"
+
+ # To activate colors in generic commands.
+ alias ls='ls --color=auto'
+ alias grep='grep --color=auto'
+
+ # Add the Git branch information to the command prompt only when Git is
+ # present. Also set the command-prompt color to purple for normal users
+ # and red when the root is running it.
+ if git --version &> /dev/null; then
+ parse_git_branch() {
+ git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
+ }
+ else
+ parse_git_branch() { echo &> /dev/null; }
+ fi
+ if [ x$(whoami) = xroot ]; then
+ export PS1="[\[\033[01;31m\]\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\]]# "
+ else
+ export PS1="[\[\033[01;35m\]maneage@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\]]$ "
+ fi
+fi
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh
index b946c3b..4f71bee 100755
--- a/reproduce/software/shell/configure.sh
+++ b/reproduce/software/shell/configure.sh
@@ -2,9 +2,9 @@
#
# Necessary preparations/configurations for the reproducible project.
#
-# Copyright (C) 2018-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
-# Copyright (C) 2021-2022 Raul Infante-Sainz <infantesainz@gmail.com>
-# Copyright (C) 2022 Pedram Ashofteh Ardakani <pedramardakani@pm.me>
+# Copyright (C) 2018-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2021-2023 Raul Infante-Sainz <infantesainz@gmail.com>
+# Copyright (C) 2022-2023 Pedram Ashofteh Ardakani <pedramardakani@pm.me>
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -446,7 +446,9 @@ if ! [ -d $compilertestdir ]; then mkdir $compilertestdir; fi
# also harmless for our test here, so it is generally added.
testprog=$compilertestdir/test
testsource=$compilertestdir/test.c
-noccwarnings="-Wno-nullability-completeness"
+if [ x$on_mac_os = xyes ]; then
+ noccwarnings="-Wno-nullability-completeness"
+fi
echo; echo; echo "Checking host C compiler ('$CC')...";
cat > $testsource <<EOF
#include <stdio.h>
diff --git a/reproduce/software/shell/git-post-checkout b/reproduce/software/shell/git-post-checkout
index d49504d..a1340d7 100755
--- a/reproduce/software/shell/git-post-checkout
+++ b/reproduce/software/shell/git-post-checkout
@@ -4,7 +4,7 @@
# controlled files (with each commit) using the 'metastore' program.
#
# Copyright (C) 2016 Przemyslaw Pawelczyk <przemoc@gmail.com>
-# Copyright (C) 2018-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2018-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This script is taken from the 'examples/hooks/pre-commit' file of the
# 'metastore' package (installed within the project, with an MIT license
diff --git a/reproduce/software/shell/git-pre-commit b/reproduce/software/shell/git-pre-commit
index 10ad710..02ba488 100755
--- a/reproduce/software/shell/git-pre-commit
+++ b/reproduce/software/shell/git-pre-commit
@@ -4,7 +4,7 @@
# controlled files (with each commit) using the 'metastore' program.
#
# Copyright (C) 2016 Przemyslaw Pawelczyk <przemoc@gmail.com>
-# Copyright (C) 2018-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2018-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# WARNING:
#
diff --git a/reproduce/software/shell/pre-make-build.sh b/reproduce/software/shell/pre-make-build.sh
index e7de93d..808429b 100755
--- a/reproduce/software/shell/pre-make-build.sh
+++ b/reproduce/software/shell/pre-make-build.sh
@@ -2,7 +2,7 @@
#
# Very basic tools necessary to start Maneage's default building.
#
-# Copyright (C) 2020-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2020-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -230,7 +230,7 @@ build_program() {
# (without compression it is just ~400Kb). So we use its '.tar' file and
# won't rely on the host's compression tools at all.
progname="lzip"
-progname_tex="Lzip"
+progname_tex="" # Lzip re-built after GCC (empty string to avoid repetition)
url=$(awk '/^'$progname'-url/{print $3}' $urlfile)
version=$(awk '/^'$progname'-version/{print $3}' "$versionsfile")
tarball=$progname-$version.tar
diff --git a/reproduce/software/shell/run-parts.in b/reproduce/software/shell/run-parts.in
index a6db9e0..a7b7705 100755
--- a/reproduce/software/shell/run-parts.in
+++ b/reproduce/software/shell/run-parts.in
@@ -10,8 +10,8 @@
# However, it didn't have a copyright statement. So one is being added
# here.
#
-# Copyright (C) 2022 Authors mentioned above.
-# Copyright (C) 2020-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2023 Authors mentioned above.
+# Copyright (C) 2020-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/reproduce/software/shell/tarball-prepare.sh b/reproduce/software/shell/tarball-prepare.sh
index 69e6afa..472b4c0 100755
--- a/reproduce/software/shell/tarball-prepare.sh
+++ b/reproduce/software/shell/tarball-prepare.sh
@@ -15,8 +15,8 @@
#
# Discussion: https://savannah.nongnu.org/task/?15699
#
-# Copyright (C) 2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
-# Copyright (C) 2022 Pedram Ashofteh Ardakani <pedramardakani@pm.me>
+# Copyright (C) 2022-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2022-2023 Pedram Ashofteh Ardakani <pedramardakani@pm.me>
# Released under GNU GPLv3+
# Abort the script in case of an error.
@@ -154,9 +154,10 @@ fi
# Process all files
for f in $allfiles; do
- # Seperate name and version number
- name=$(echo $f | sed -e 's/.tar.*//' \
- | awk 'BEGIN { FS = "[-_ ]" } {print $1 "-" $2}')
+ # Extract the name and version (while replacing any possible '_' with
+ # '-' because some software separate name and version with '_').
+ name=$(echo $(basename $f) \
+ | sed -e 's/.tar.*//' -e's/_/-/')
# Skip previously packed files
if [ -f $odir/$name.tar.lz ]; then
@@ -202,6 +203,11 @@ for f in $allfiles; do
mv * $name/
fi
+ # 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)
+
# Pack with recommended options
tar -c -Hustar --owner=root --group=root \
-f $name.tar $name/
@@ -215,5 +221,5 @@ for f in $allfiles; do
echo $(sha512sum $odir/$name.tar.lz)
# Clean up the temporary directory
- rm -r $tmpdir
+ rm -rf $tmpdir
done