Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- STORY_KEY=$(git symbolic-ref --short HEAD | grep -Eo '^[a-zA-Z0-9]{3,}[-_][0-9]{1,5}' | awk '{sub(/_/, "-"); print toupper($0)}')
- if [ -n "$STORY_KEY" ]; then
- sed -i.bak -e "1s/^/[$STORY_KEY] /" $1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement