summaryrefslogtreecommitdiff
path: root/job.common
blob: 92941dc58f7bfc01751700b16003821d91e0a3ac (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
25
# vim: ft=sh
set -e
if [ -z "$WORKSPACE" ]; then
	. "$(dirname "$(readlink -f "$0")")/../fakelaminar"
fi

# Subprocess inclusion guard
[ -z "$LAMINAR_COMMON" ]
export LAMINAR_COMMON=y

# Job and template id
export JOBID="$(basename "$0" | sed 's/\.run$//')"
export TEMPLATEID="$(basename "$(readlink -f "$0")" | sed 's/\.run$//')"

# Template workspace
export TWORKSPACE="$HOME/workspace/$TEMPLATEID"
if [ "$JOBID" = "$TEMPLATEID" ]; then
	TWORKSPACE="$HOME/workspace/notemplate"
fi

# Files directory
export FILES="$(readlink -f "$(dirname "$(readlink -f "$0")")/../files")"

# Include utils
. utils