ContainerImage.GitSparseClone/init/entrypoint.sh

13 lines
284 B
Bash
Raw Normal View History

2020-02-17 12:40:01 +00:00
#!/bin/sh
# Clone git-repo
git init
git config core.sparsecheckout true
echo $SPARSE_CHECKOUT >> .git/info/sparse-checkout
git remote add -f origin $REMOTE_REPO
git pull origin $REMOTE_BRANCH
mkdir -p /app/$COMPONENT/scripts
mv ./components/*/**/* /app/$COMPONENT/scripts
exec "$@"