Created
May 24, 2017 02:56
-
-
Save xywei/75a9a0581792dee02851c4656e93c5a2 to your computer and use it in GitHub Desktop.
Setup symlinks for Gitlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Make symlinks to allow Gitlab to pickup data here. | |
# This is a useful one-liner which will give you the full directory name of | |
# the script no matter where it is being called from. | |
GDATA_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
GLINK_DIR=~/.gitlab | |
if [ -d "$GLINK_DIR" ]; then | |
echo "$GLINK_DIR already exists! exiting .." | |
exit; | |
fi | |
mkdir -p "$GLINK_DIR" | |
ln -s "$GDATA_DIR"/gitlab/config ~/.gitlab/config | |
ln -s "$GDATA_DIR"/gitlab/logs ~/.gitlab/logs | |
ln -s "$GDATA_DIR"/gitlab/data ~/.gitlab/data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment