Last active
July 14, 2016 15:50
-
-
Save 4lun/fb302b0dc97c4a03990251a00d42230e to your computer and use it in GitHub Desktop.
Setup script for lolcommits on OSX (requires brew) or Debian/Ubuntu (apt-get): https://github.com/mroth/lolcommits
This file contains 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
#!/usr/bin/env bash | |
if [ "$(uname)" == "Darwin" ]; then | |
echo -e "\n# Installing dependencies\n" | |
brew install imagemagick | |
brew install ffmpeg | |
echo -e "\n# Installing lolcommits\n" | |
sudo gem install lolcommits | |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
echo -e "\n# Installing dependencies\n" | |
sudo apt install -y imagemagick ffmpeg mplayer | |
echo -e "\n# Installing lolcommits\n" | |
gem install lolcommits | |
fi | |
echo -e "\n# Adding lolcommits to default post-commit hook\n" | |
mkdir -p ~/.git_template/hooks | |
git config --global init.templatedir '~/.git_template' | |
echo -e "#!/bin/sh | |
### lolcommits hook (begin) ### | |
if [ ! -d "$GIT_DIR/rebase-merge" ]; then | |
lolcommits --capture --delay=1 | |
lolcommits --capture --animate=3 --delay=1 --fork | |
fi | |
### lolcommits hook (end) ### | |
" > ~/.git_template/hooks/post-commit | |
chmod +x ~/.git_template/hooks/post-commit | |
echo -e "\n# Run 'git init' in existing repositories to enable lolcommits" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment