aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/buildsystem/templates/wrapper.maintdb19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/buildsystem/templates/wrapper.maintdb b/modules/buildsystem/templates/wrapper.maintdb
index a27994ff..2f6e2324 100644
--- a/modules/buildsystem/templates/wrapper.maintdb
+++ b/modules/buildsystem/templates/wrapper.maintdb
@@ -2,6 +2,25 @@
maintdbuser="<%= maintdb_login %>"
maintdbpath="<%= maintdb_binpath %>"
+packagersgroup="<%= packagers_group %>"
+
+function isingroup()
+{
+ grp="$1"
+ for group in `groups`
+ do if [ "$grp" = "$group" ]
+ then
+ return 0
+ fi
+ done
+ return 1
+}
+
+if ! isingroup "$packagersgroup"
+then
+ echo "You are not in $packagersgroup group."
+ exit 1
+fi
sudo -u "$maintdbuser" "$maintdbpath" $(whoami) $@