forked from varnishcache/pkg-varnish-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.sh
More file actions
34 lines (28 loc) · 658 Bytes
/
Copy pathcommon.sh
File metadata and controls
34 lines (28 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function findversion() {
tarfile=$1
# This looks like something that should work, but I can't get it right.
# tar -zxf sources/varnish-4.1.0.tar.gz --wildcards-match^Clash --wildcards '*figure';
# Workaround follows.
TMP=tmp.$$.$RANDOM
mkdir -p $TMP
tar zxf $tarfile -C $TMP
mv $TMP/*/configure .
rm -rf $TMP
V=$(grep PACKAGE_VERSION= configure | sed "s/.*=//;s/'//g")
RELEASE=""
if [ "$V" = "trunk" ]; then
V="5.1"
MINOR="0"
else
# 4.1.1
# 4.1.1-beta1
MINOR="${V:4:1}"
RELEASE="${V:6}"
V="${V:0:3}"
fi
rm configure
}
#findversion sources/varnish-4.1*gz
#echo "V is: $V"
#echo "MINOR is $MINOR"
#echo "RELEASE is $RELEASE"