File: sver.sh

package info (click to toggle)
snack 2.2.10-dfsg1-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,000 kB
  • ctags: 3,550
  • sloc: ansic: 35,476; sh: 8,557; tcl: 1,065; python: 701; makefile: 556
file content (20 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#/bin/bash

RESULT=`grep SNACK_VERSION "$1"`
THIS_ONE=0
for i in $RESULT; do
   if test "$THIS_ONE" = "1" ; then
     #echo "THIS ONE is \'$i\'"
     LEN=`expr length "$i"`
     #echo "LEN is $LEN"
     END=`expr $LEN - 2`
     #echo "END is $END"
     VERSION=`expr substr "$i" 2 $END`
   fi
   if test "$i" = "SNACK_VERSION"; then
     THIS_ONE=1
   fi
done
#echo "final VERSION is '$VERSION'"
echo $VERSION