CI: cross-compilation; build packages on every push.
[tinc] / .ci / test / prepare.sh
1 #!/bin/sh
2
3 set -eu
4
5 if [ "$(id -u)" != 0 ] && sudo --preserve-env --non-interactive true; then
6   echo >&2 "sudo already configured"
7   exit 0
8 fi
9
10 useradd --user-group build
11
12 echo 'build ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/build
13 chmod 440 /etc/sudoers.d/build
14 visudo --check