Skip to content
Snippets Groups Projects

Merging develop into main

Merged jurgenhaas requested to merge develop into main
1 file
+ 4
10
Compare changes
  • Side-by-side
  • Inline
+ 4
10
@@ -286,16 +286,10 @@ if [[ "${COMPOSE_PROJECT_NAME}" != "." ]]; then
echo "#!/bin/sh" > .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
fi
OLDCOMMAND='docker exec '${COMPOSE_PROJECT_NAME}'_'${USERNAME}'_l3d /usr/local/bin/update-env'
NEWCOMMAND='RUNNING=$(docker container ls --all -q -f name='${COMPOSE_PROJECT_NAME}'_'${USERNAME}_'l3d);if [ "x$RUNNING" != "x" ];then docker exec '${COMPOSE_PROJECT_NAME}'_l3d /usr/local/bin/update-env;fi'
OLD_HOOK_DEFINED=$(grep "$OLDCOMMAND" .git/hooks/post-checkout)
NEW_HOOK_DEFINED=$(grep "$NEWCOMMAND" .git/hooks/post-checkout)
if [[ "x$OLD_HOOK_DEFINED" = "x" ]]; then
echo "$NEWCOMMAND" >> .git/hooks/post-checkout
elif [[ "x$NEW_HOOK_DEFINED" = "x" ]]; then
OLDCOMMAND="${OLDCOMMAND//\//\\/}"
sed -i -e "/${OLDCOMMAND}/d" .git/hooks/post-checkout
echo "$NEWCOMMAND" >> .git/hooks/post-checkout
COMMAND='RUNNING=$(docker container ls --all -q -f name='${COMPOSE_PROJECT_NAME}'_'${USERNAME}'_l3d);if [ "x$RUNNING" != "x" ];then docker exec '${COMPOSE_PROJECT_NAME}'_'${USERNAME}'_l3d /usr/local/bin/update-env;fi'
HOOK_DEFINED=$(grep "$COMMAND" .git/hooks/post-checkout)
if [[ "x$HOOK_DEFINED" = "x" ]]; then
echo "$COMMAND" >> .git/hooks/post-checkout
fi
fi
fi
Loading