1
0
mirror of https://github.com/newnius/YAO-Dockerfiles.git synced 2025-06-06 07:51:54 +00:00
YAO-Dockerfiles/base/bootstrap.sh
2019-05-13 19:41:32 +08:00

18 lines
366 B
Bash
Executable File

#!/bin/bash
if ! [[ -z "${repo}" ]]; then
if [[ -z "${branch}" ]]; then
git clone $repo /workspace
else
git clone -b $branch $repo /workspace
fi
fi
if [ -d /workspace ]; then
cd /workspace
fi
# use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment
eval $@