aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-09-26 14:42:39 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-09-26 14:42:39 +0100
commitbe31089199a7697531307930a76ae1cd412a1e88 (patch)
tree7ee7f388ad6c2d460a07cbd222cb67c13ca680c5 /project
parent26b3ed86f8f56e85a5cd41838fdd6946e6dfa77a (diff)
Working project when downloaded from arXiv
Until now, we were assuming that the users would just clone the project in Git. But after submitting arXiv:1909.11230, and trying to build directly from the arXiv source, I noticed several problems that wouldn't allow users to build it automatically. So I tried the build step by step and was able to find a fix for the several issues that came up. The scripting parts of the fix were primarily related to the fact that the unpacked arXiv tarball isn't under version control, so some checks had to be put there. Also, we wanted to make it easy to remove the extra files, so an extra `--clean-texdit' option was added to `./project'. Finally, some manual corrections were necessary (prior to running `./project', which are now described in `README.md'. Most of the later steps can be automated and we should do it later, I just don't have enough time now.
Diffstat (limited to 'project')
-rwxr-xr-xproject13
1 files changed, 13 insertions, 0 deletions
diff --git a/project b/project
index e7f44a8..383ecb1 100755
--- a/project
+++ b/project
@@ -31,6 +31,7 @@ build_dir=
input_dir=
make_targets=
software_dir=
+clean_texdir=0
existing_conf=0
scriptname="./project"
minmapsize=10000000000
@@ -90,6 +91,9 @@ Configure options:
-i, --input-dir=STR Directory containing input datasets (optional).
-m, --minmapsize=INT [Gnuastro] Minimum number of bytes to use RAM.
-s, --software-dir=STR Directory containing necessary software tarballs.
+ --clean-texdir Remove possibly existing build-time subdirectories
+ under the project's 'tex/' directory (can happen
+ when source is from arXiv for example).
Configure and Make options:
-g, --group=STR Build and run with write permissions for a group.
@@ -159,6 +163,8 @@ do
-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;;
+ --clean-texdir) clean_texdir=1; shift;;
+ --clean-texdir=*) on_off_option_error --clean-texdir;;
# Configure and Make options:
-g|--group) group="$2"; check_v group "$group"; shift;shift;;
@@ -217,6 +223,13 @@ case $operation in
# Build the project's software.
configure)
+ # If the user requested, clean the TeX directory from the extra
+ # (to-be-built) directories that may already be there (and will not
+ # allow the configuration to complete).
+ if [ x"$clean_texdir" = x1 ]; then
+ rm -rf tex/build tex/tikz
+ fi
+
# Variables to pass to the configuration script.
export jobs=$jobs
export host_cc=$host_cc