Punt invirt-ood-packages and invirt-ood-build from invirt-dev's
[invirt/packages/invirt-dev.git] / debian / invirt-dev.postinst
1 #!/bin/sh
2 set -e
3
4 #DEBHELPER#
5
6 case "$1" in
7     configure)
8         if [ -z "$2" ]; then
9             adduser --system repository
10             addgroup --system repo
11             
12             cat >>/etc/sudoers <<EOF
13 ### BEGIN invirt-dev
14 %repo   ALL=(repository)        ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro
15 ### END invirt-dev
16 EOF
17             echo "-----"
18             echo "invirt-dev: run"
19             echo "  adduser --disabled-password \$user"
20             echo "  adduser \$user repo"
21             echo "  adduser \$user sbuild"
22             echo "to make individual users that will build packages."
23             echo "-----"
24         fi
25     ;;
26
27     abort-upgrade|abort-remove|abort-deconfigure)
28     ;;
29
30     *)
31         echo "postinst called with unknown argument \`$1'" >&2
32         exit 1
33     ;;
34 esac