From 4980ac6405aced6a7cfb2d5951f7abed8774d020 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Mon, 17 Feb 2020 12:40:01 +0000 Subject: [PATCH] Add 'init/entrypoint.sh' --- init/entrypoint.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 init/entrypoint.sh diff --git a/init/entrypoint.sh b/init/entrypoint.sh new file mode 100644 index 0000000..a5a3bf3 --- /dev/null +++ b/init/entrypoint.sh @@ -0,0 +1,13 @@ +#!/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 "$@" \ No newline at end of file