summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_schedule_on_demand.sh
blob: 7b51949c6851d496df945267f820493644e97997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# Copyright 2014 Holger Levsen <holger@layer-acht.org>
#         © 2015 Mattia Rizzolo <mattia@mapreri.org>
# released under the GPLv=2

set -e

if [ ! -z "$SUDO_USER" ] ; then
	REQUESTER="$SUDO_USER"
else
	echo "Looks like you logged into this host as the jenkins user without sudoing to it. How can that be possible?!?!"
	echo "You're doing something too weird to be supported, please be normal, exiting."
	exit 1
fi

LC_USER="$REQUESTER" \
LOCAL_CALL="true" \
/srv/jenkins/bin/reproducible_remote_scheduler.py "$@"