Skip to content

Instantly share code, notes, and snippets.

@wlalele
Created February 5, 2018 16:21
Show Gist options
  • Save wlalele/ba9d730fb73e03f7d5c44d9cff7734dc to your computer and use it in GitHub Desktop.
Save wlalele/ba9d730fb73e03f7d5c44d9cff7734dc to your computer and use it in GitHub Desktop.
Custom PrePush hook
#!/bin/sh
exec < /dev/tty
while true; do
read -p "Is the documentation, coding-standard and tests okay? (Y/n) " yn
if [ "$yn" = "" ]; then
yn='Y'
fi
case $yn in
[Yy] ) echo "Pushing..."; break;;
[Nn] ) exit 255;;
* ) echo "Please answer y or n for yes or no.";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment