summaryrefslogtreecommitdiff
path: root/contrib/gate/entrypoint.sh
blob: 0189cf7c5312449c13cff9adac9116be5a365e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

[[ -n "$SRCPATH" ]] || \
    ( echo "ERROR: \$SRCPATH must be non-empty" && exit 1 )
[[ -n "$GOSRC" ]] || \
    ( echo "ERROR: \$GOSRC must be non-empty" && exit 2 )
[[ -r "${SRCPATH}/contrib/gate/Dockerfile" ]] || \
    ( echo "ERROR: Expecting libpod repository root at $SRCPATH" && exit 3 )

# Working from a copy avoids needing to perturb the actual source files
mkdir -p "$GOSRC"
/usr/bin/rsync --recursive --links --quiet --safe-links \
               --perms --times --delete "${SRCPATH}/" "${GOSRC}/"
cd "$GOSRC"
make "$@"