File: split_tag.sh

package info (click to toggle)
cheetah 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,052 kB
  • sloc: python: 10,653; ansic: 584; xml: 323; sh: 181; makefile: 87
file content (22 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
split_tag() {
   branch=$2
   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/'`
   major=$1
   minor=$2
   micro=$3
   if [ -n "$4" ]; then
      if [ "$4" = rc ]; then
         state="release candidate"
      else
         state=$4
      fi
      serial=$5
   else
      state=final
      serial=0
   fi

   if [ -z "$branch" ]; then
      branch=$major.$minor
   fi
}