"Fossies" - the Fresh Open Source Software Archive

Member "cheetah3-3.2.6.post2/devscripts/split_tag.sh" (20 Apr 2021, 467 Bytes) of package /linux/www/cheetah3-3.2.6.post2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 }