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

# Copyright 2014,2016 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 "Please run this script as the jenkins user, exiting."
	exit 1
fi

if [ -z "$1" ] ; then
	PARAMS="--help"
else
	PARAMS="$@"
fi

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