Skip to content

Instantly share code, notes, and snippets.

@aherve
Created May 31, 2017 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aherve/db00720e990e8ff7bd4912f235648c3b to your computer and use it in GitHub Desktop.
Save aherve/db00720e990e8ff7bd4912f235648c3b to your computer and use it in GitHub Desktop.
#!/bin/bash
# Lunatic pre-commit hook
echo 'pre-commit hook starting'
FLIP=$(($(($RANDOM%10))%2))
if [ $FLIP -eq 1 ]
then
echo 'Okay, I will accept your commit'
exit 0
else
echo 'Meh. Maybe another time'
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment