1 split_tag() { 2 branch=$2 3 set -- `echo $1 | sed -e 's/\./ /g' -e 's/a/ alpha /' -e 's/b/ beta /' -e 's/rc/ rc /' -e 's/\([0-9]\)c/\1 rc /' -e 's/post\([0-9]\+\)/ post \1/'` 4 major=$1 5 minor=$2 6 micro=$3 7 if [ -n "$4" ]; then 8 if [ "$4" = rc ]; then 9 state="release candidate" 10 else 11 state=$4 12 fi 13 serial=$5 14 else 15 state=final 16 serial=0 17 fi 18 19 if [ -z "$branch" ]; then 20 branch=$major.$minor 21 fi 22 }