aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2021-03-28 12:55:03 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2021-03-28 12:55:03 +0100
commit20b6273a65ab4d99ad760fd715ca935494d4fc2e (patch)
tree3d8281837d6512dc8fcb61716203268ec3375c2e /project
parent611c2f1e6ebbd4e4f83b66325707afb7038d1026 (diff)
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'.
Diffstat (limited to 'project')
-rwxr-xr-xproject6
1 files changed, 3 insertions, 3 deletions
diff --git a/project b/project
index 1e3aeb4..53452ff 100755
--- a/project
+++ b/project
@@ -326,14 +326,14 @@ fi
if ! [ x$group = x ]; then
# Check if group is usable.
- if ! sg "$group" "echo test &> /dev/null" &> /dev/null; then
+ if ! sg "$group" "echo Group \'$group\' exists"; then
echo "$scriptname: '$group' is not a usable group name on this system.";
echo "(TIP: you can use the 'groups' command to see your groups)"
exit 1
fi
# Set the group option for running Make.
- gopt="reproducible_paper_group_name=$group"
+ gopt="maneage_group_name=$group"
fi
@@ -441,10 +441,10 @@ case $operation in
export build_dir=$build_dir
export input_dir=$input_dir
export scriptname=$scriptname
+ export maneage_group_name=$group
export software_dir=$software_dir
export existing_conf=$existing_conf
export all_highlevel=$all_highlevel
- export reproducible_paper_group_name=$group
# Run the configuration script
if [ x"$group" = x ]; then