From 621289494d23d3ac0b383d63371205cb826ccb8c Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 28 Sep 2019 21:46:18 +0100 Subject: Main project script sets executable flags at configure time Until now, when the project's source was downloaded from something like arXiv, in `README.md', we were instructing them to set the executable flags of all the files that need it. But except for `./project', the reader shouldn't have to worry about the project internals! Once its executable, `./project' can easily fix the executable flags of all the files that need it automatically. With this commit, in `README.md', we just instruct the reader to set the executable flag of `./project' and any other file that needs an executable flag is given one at the start of the set of commands for `./project configure'. In customized projects, if an author needs executable flags on any other files, they can easily add it there without involving the user. --- .file-metadata | Bin 6250 -> 6250 bytes README.md | 6 +++--- project | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.file-metadata b/.file-metadata index b75a1d7..196f109 100644 Binary files a/.file-metadata and b/.file-metadata differ diff --git a/README.md b/README.md index 3dd2757..f0f6acc 100644 --- a/README.md +++ b/README.md @@ -112,11 +112,11 @@ this source from arXiv, some minor extra steps are necessary: 2. arXiv removes the executable flag from the files (for its own security). So before following the standard procedure of projects - described in the sections above, its necessary to make the necessary - script files executable with the command below: + described in the sections above, its necessary to set the executable + flag of the main project management file with this command: ```shell - $ chmod +x project reproduce/software/bash/* reproduce/analysis/bash/* + $ chmod +x project ``` 3. Remove extra files. In order to make sure arXiv can build the paper diff --git a/project b/project index 383ecb1..14fc272 100755 --- a/project +++ b/project @@ -21,6 +21,10 @@ # Stop the script if there are any errors. set -e + + + + # Default option values jobs=0 # 0 is for the default for the `configure.sh' script. group= @@ -223,6 +227,22 @@ case $operation in # Build the project's software. configure) + # Set executable flags + # -------------------- + # + # In some scenarios (for example when using a tarball from arXiv), + # it may happen that the host server has removed the executable + # flags of all the files. In `README.md' we instruct the readers on + # setting the executable flag of this script. But we don't want the + # user to have to worry about any other file that needs an + # executable flag. + # + # Basically, all the files (shell scripts) in the two + # `reproduce/*/bash' should need executable flags, so we are giving + # them executable flags by default. If any other file in your project + # needs such flags, add them here. + chmod +x reproduce/software/bash/* reproduce/analysis/bash/* + # 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). -- cgit v1.2.1