From c6a4aaad62a90af9a72f9bc58650696419474239 Mon Sep 17 00:00:00 2001
From: Mohammadreza Khellat <mkhellat@gmail.com>
Date: Wed, 26 Aug 2020 14:53:10 +0400
Subject: Machine architecture and byte-order available as LaTeX macro

Until now, no machine-related specifications were being documented in the
workflow. This information can become helpful when observing differences in
the outcome of both software and analysis segments of the workflow by
others (some software may behave differently based on host machine).

With this commit, the host machine's 'hardware class' and 'byte-order' are
collected and now available as LaTeX macros for the authors to use in the
paper. Currently it is placed in the acknowledgments, right after
mentioning the Maneage commit.

Furthermore, the project and configuration scripts are now capable of
dealing with input directory names that have SPACE (and other special
characters) by putting them inside double-quotes. However, having spaces
and metacharacters in the address of the build directory could cause
build/install failure for some software source files which are beyond the
control of Maneage. So we now check the user's given build directory
string, and if the string has any '@', '#', '$', '%', '^', '&', '*', '(',
')', '+', ';', and ' ' (SPACE), it will ask the user to provide a different
directory.
---
 project | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

(limited to 'project')

diff --git a/project b/project
index 7368151..29d633d 100755
--- a/project
+++ b/project
@@ -167,27 +167,27 @@ do
 
 
   # Configure options:
-  -b|--builddir)         build_dir="$2";                             check_v "$1" "$build_dir";    shift;shift;;
-  -b=*|--build-dir=*)    build_dir="${1#*=}";                        check_v "$1" "$build_dir";    shift;;
-  -b*)                   build_dir=$(echo    "$1" | sed -e's/-b//'); check_v "$1" "$build_dir";    shift;;
-  -e|--existing-conf)    existing_conf=1;                                                          shift;;
+  -b|--build-dir)        IFS='"' build_dir="$2";                             check_v "$1" "$build_dir";    shift;shift;;
+  -b=*|--build-dir=*)    IFS='"' build_dir="${1#*=}";                        check_v "$1" "$build_dir";    shift;;
+  -b*)                   IFS='"' build_dir=$(echo    "$1" | sed -e's/-b//'); check_v "$1" "$build_dir";    shift;;
+  -e|--existing-conf)    existing_conf=1;                                                                  shift;;
   -e*|--existing-conf=*) on_off_option_error --existing-conf -e;;
-  --host-cc)             host_cc=1;                                                                shift;;
+  --host-cc)             host_cc=1;                                                                        shift;;
   --host-cc=*)           on_off_option_error --host-cc;;
-  -i|--input-dir)        input_dir="$2";                             check_v "$1" "$input_dir";    shift;shift;;
-  -i=*|--input-dir=*)    input_dir="${1#*=}";                        check_v "$1" "$input_dir";    shift;;
-  -i*)                   input_dir=$(echo    "$1" | sed -e's/-i//'); check_v "$1" "$input_dir";    shift;;
-  -m|--minmapsize)       minmapsize="$2";                            check_v "$1" "$minmapsize";   shift;shift;;
-  -m=*|--minmapsize=*)   minmapsize="${1#*=}";                       check_v "$1" "$minmapsize";   shift;;
-  -m*)                   minmapsize=$(echo   "$1" | sed -e's/-m//'); check_v "$1" "$minmapsize";   shift;;
-  -s|--software-dir)     software_dir="$2";                          check_v "$1" "$software_dir"; shift;shift;;
-  -s=*|--software-dir=*) software_dir="${1#*=}";                     check_v "$1" "$software_dir"; shift;;
-  -s*)                   software_dir=$(echo "$1" | sed -e's/-s//'); check_v "$1" "$software_dir"; shift;;
-  --check-config)        check_config=1;                                                           shift;;
+  -i|--input-dir)        IFS='"' input_dir="$2";                             check_v "$1" "$input_dir";    shift;shift;;
+  -i=*|--input-dir=*)    IFS='"' input_dir="${1#*=}";                        check_v "$1" "$input_dir";    shift;;
+  -i*)                   input_dir=$(echo    "$1" | sed -e's/-i//');         check_v "$1" "$input_dir";    shift;;
+  -m|--minmapsize)       minmapsize="$2";                                    check_v "$1" "$minmapsize";   shift;shift;;
+  -m=*|--minmapsize=*)   minmapsize="${1#*=}";                               check_v "$1" "$minmapsize";   shift;;
+  -m*)                   minmapsize=$(echo   "$1" | sed -e's/-m//');         check_v "$1" "$minmapsize";   shift;;
+  -s|--software-dir)     IFS='"' software_dir="$2";                          check_v "$1" "$software_dir"; shift;shift;;
+  -s=*|--software-dir=*) IFS='"' software_dir="${1#*=}";                     check_v "$1" "$software_dir"; shift;;
+  -s*)                   IFS='"' software_dir=$(echo "$1" | sed -e's/-s//'); check_v "$1" "$software_dir"; shift;;
+  --check-config)        check_config=1;                                                                   shift;;
   --check-config=*)      on_off_option_error --check-config;;
-  --clean-texdir)        clean_texdir=1;                                                           shift;;
+  --clean-texdir)        clean_texdir=1;                                                                   shift;;
   --clean-texdir=*)      on_off_option_error --clean-texdir;;
-  --all-highlevel)       all_highlevel=1;                                                          shift;;
+  --all-highlevel)       all_highlevel=1;                                                                  shift;;
   --all-highlevel=*)     on_off_option_error --all-highlevel;;
 
   # Configure and Make options:
@@ -279,7 +279,7 @@ EOF
             check=$(ls .local/version-info/proglib/)
             if ! [ "x$check" = x ]; then
                 printresults=1
-                ln -s $(pwd)/.local/version-info/proglib/* $checkdir/
+                ln -s "$(pwd)"/.local/version-info/proglib/* $checkdir/
             fi
 
             # If something was actually found, then print them.
@@ -304,7 +304,7 @@ EOF
         echo "========================"
 
         # Wait for the next round of checks.
-        sleep 1;
+        sleep 1
     done
     exit 0
 fi
-- 
cgit v1.2.1