2019-04-12 06:50:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if ! [[ -z "${repo}" ]]; then
|
|
|
|
if [[ -z "${branch}" ]]; then
|
2019-05-13 11:41:32 +00:00
|
|
|
git clone $repo /workspace
|
2019-04-12 06:50:46 +00:00
|
|
|
else
|
|
|
|
git clone -b $branch $repo /workspace
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2019-05-13 11:41:32 +00:00
|
|
|
if [ -d /workspace ]; then
|
|
|
|
cd /workspace
|
|
|
|
fi
|
2019-04-12 06:50:46 +00:00
|
|
|
|
2019-12-24 07:12:59 +00:00
|
|
|
sleep infinity
|
2019-07-10 12:47:02 +00:00
|
|
|
|
2019-05-13 11:41:32 +00:00
|
|
|
# use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment
|
|
|
|
eval $@
|
2019-04-12 06:50:46 +00:00
|
|
|
|