From 20b6273a65ab4d99ad760fd715ca935494d4fc2e Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sun, 28 Mar 2021 12:55:03 +0100 Subject: Configuration: corrected check of group name When built in 'group' mode, the write permissions of all created files will be activated for a certain group of users in the host operating system. The user specifies the name of the group with the '--group' option at configure time. At the very start, the './project' script checks to see if the given group name actually exists or not (to avoid hard-to-debug errors popping up later). Until now, the checking 'sg' command (that was used to build the project with group-writable permissions) would always fail due to the excessive number of redirections. Therefore, it would always print the error message and abort. With this commit, the output of 'sg' is no longer re-directed (which also helps users in debuggin). If the group does actually exist, it will just print a small statement saying so, and if it fails, the error message is printed. This fixed the problem, allowing maneage to be built in group-mode. I also noticed that the variable name keeping the group name ('reproducible_paper_group_name') used the old name for the project (which was "Reproducible paper template"! So it has been changed/corrected to 'maneage_group_name'. --- reproduce/analysis/make/top-make.mk | 4 ++-- reproduce/analysis/make/top-prepare.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'reproduce/analysis/make') diff --git a/reproduce/analysis/make/top-make.mk b/reproduce/analysis/make/top-make.mk index 026220e..596cc0d 100644 --- a/reproduce/analysis/make/top-make.mk +++ b/reproduce/analysis/make/top-make.mk @@ -51,7 +51,7 @@ include reproduce/software/config/LOCAL.conf # Controlling this requires two variables that are available at this stage: # # - `GROUP-NAME': from `LOCAL.conf' (which was built by `./project configure'). -# - `reproducible_paper_group_name': value to the `--group' option. +# - `maneage_group_name': value to the `--group' option. # # The analysis is only done when both have the same group name. Note that # when the project isn't being built for a group, both variables will be an @@ -64,7 +64,7 @@ include reproduce/software/config/LOCAL.conf # If you are just interested in the processing and don't want to build the # PDF, you can skip the creation of the final PDF by giving a value of # `yes' to `pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'. -ifeq (x$(reproducible_paper_group_name),x$(GROUP-NAME)) +ifeq (x$(maneage_group_name),x$(GROUP-NAME)) all: paper.pdf else all: diff --git a/reproduce/analysis/make/top-prepare.mk b/reproduce/analysis/make/top-prepare.mk index f81ac07..fb5700e 100644 --- a/reproduce/analysis/make/top-prepare.mk +++ b/reproduce/analysis/make/top-prepare.mk @@ -35,7 +35,7 @@ include reproduce/software/config/LOCAL.conf # ------------------------------- # # See `top-make.mk' for complete explanation. -ifeq (x$(reproducible_paper_group_name),x$(GROUP-NAME)) +ifeq (x$(maneage_group_name),x$(GROUP-NAME)) all: $(BDIR)/software/preparation-done.mk @echo "Project preparation is complete."; else -- cgit v1.2.1