Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- INPUT_FILE=$1
- START_LINE=`head -n1 $INPUT_FILE`
- PATTERN="^#[0-9]+ .*"
- if ! [[ "$START_LINE" =~ $PATTERN ]]; then
- echo "Bad commit message, see example: #[numertaska] [komentarz] commit message"
- echo "Enetered commit message '$START_LINE'"
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement