Skip to content

Instantly share code, notes, and snippets.

@4lun
Last active July 14, 2016 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4lun/fb302b0dc97c4a03990251a00d42230e to your computer and use it in GitHub Desktop.
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
#!/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