diff --git a/start.sh b/start.sh index 11e484993150bd50c0a16ca34e2a04f9c566c120..30b933218b9e7b17c136006c72c488683777f924 100755 --- a/start.sh +++ b/start.sh @@ -246,3 +246,13 @@ if [[ -x "${L3DSHELL}" ]]; then else /usr/bin/fish fi + +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 +fi +/usr/local/bin/update-env