-
Notifications
You must be signed in to change notification settings - Fork 12
/
install.sh
executable file
·26 lines (24 loc) · 1002 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
bin=~/bin
hooks=~/.git_template/hooks
echo "Creating git_template dir"
mkdir -p ~/.git_template/hooks
git config --global init.templatedir '~/.git_template/'
echo "Putting post-commit.py in bin"
mkdir -p ~/bin
curl https://raw.githubusercontent.com/ranman/gitshots/master/hooks/post-commit.py > ~/bin/post-commit.py
echo "Creating post-commit hook"
cat << EOF > ~/.git_template/hooks/post-commit
#!/bin/sh
/usr/bin/python2.7 ~/bin/post-commit.py
EOF
chmod +x ~/.git_template/hooks/post-commit
echo "Installing requests dependency, if this fails fix your python or use sudo"
pip install requests
echo "Installing imagesnap dependency"
brew install imagesnap
echo "Installing CoreLocationCLI dependency"
git clone [email protected]:fulldecent/corelocationcli.git /tmp/corelocationcli
xcodebuild -project /tmp/corelocationcli/CoreLocationCLI.xcodeproj
mv /tmp/corelocationcli/build/Release/CoreLocationCLI /usr/bin
echo "\n\nNow just run git init in any repo you want to use the commit hook in!"