Skip to content
Snippets Groups Projects
Commit a05dd493 authored by jurgenhaas's avatar jurgenhaas
Browse files

Configure Git hook eralier, before starting the shell

Call update-env git hook script through docker to also make it available for IDEs
parent 767e2b85
No related branches found
Tags v2.1.1 v2.1.2
No related merge requests found
......@@ -241,18 +241,19 @@ if [[ -d /drupal/.idea ]]; then
fi
restoreEnvFile
if [[ -x "${L3DSHELL}" ]]; then
${L3DSHELL}
else
/usr/bin/fish
fi
# Configure Git Hook
if [[ ! -f .git/hooks/post-checkout ]]; then
echo "#!/bin/sh" > .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
fi
HOOK_DEFINED=$(grep /usr/local/bin/update-env .git/hooks/post-checkout)
if [[ "$HOOK_DEFINED" = "" ]]; then
echo "/usr/local/bin/update-env" >> .git/hooks/post-checkout
echo "docker exec ${COMPOSE_PROJECT_NAME}_l3d /usr/local/bin/update-env" >> .git/hooks/post-checkout
fi
/usr/local/bin/update-env
if [[ -x "${L3DSHELL}" ]]; then
${L3DSHELL}
else
/usr/bin/fish
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment