Commit 981aac02 authored by Jacob Schatz's avatar Jacob Schatz

Update script to work only when run in the gitlab directory.

parent cbb38fde
#!/bin/sh #!/bin/sh
if [ ! -f ../GDK_ROOT ]; then
echo "Please run script from gitlab (e.g. gitlab-development-kit/gitlab) root directory."
exit 1
fi
touch ./.git/hooks/pre-commit PRECOMMIT=$(git rev-parse --git-dir)/hooks/pre-commit
ln -s ./pre-commit .git/hooks/pre-commit
if [ -f $PRECOMMIT ]; then
echo "Pre-commit script already installed."
exit 1
fi
ln -s ./pre-commit $PRECOMMIT
echo "Pre-commit script installed successfully"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment