forked from lawinslow/GLM-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vers.sh
executable file
·54 lines (48 loc) · 1.46 KB
/
vers.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
vers=$1
if [ $vers = "" ] ; then
echo cannot change to a non-version
exit 1
fi
vs2008 () {
for f in `find . -name glm.vcproj` ; do
grep -w Version $f
done
}
for f in `find . -name glm.vcproj` ; do
for i in `vs2008 | sort -u | cut -f2 -d\"` ; do
COUNT=`grep -w Version $f | grep $i | wc -l`
if [ $COUNT = 4 ] ; then
echo $i is the version for $f
if [ $i != $vers ] ; then
echo sed -i "s/Version=\"${i}\"/Version=\"${vers}\"/" $f
sed -i "s/Version=\"${i}\"/Version=\"${vers}\"/" $f
else
echo no change to version number for $f
fi
fi
done
done
for f in `find . -name glm.vcxproj` ; do
i=`grep -w Version $f | sort -u | cut -f2 -d\> | cut -f1 -d\<`
echo $i is the version for $f
if [ $i != $vers ] ; then
echo sed -i "s!<Version>${i}</Version>!<Version>${vers}</Version>!" $f
sed -i "s!<Version>${i}</Version>!<Version>${vers}</Version>!" $f
else
echo no change to version number for $f
fi
done
for f in `find . -name libglm_wq_\*.vfproj` ; do
COUNT=`grep -w Version $f | grep VFLinkerTool | wc -l`
if [ $COUNT = 4 ] ; then
i=`grep -w Version $f | grep VFLinkerTool | grep LIBCMTD | sort -u | cut -f6 -d\" | cut -f1 -d\"`
echo $i is the version for $f
if [ $i != $vers ] ; then
echo sed -i "s/Version=\"${i}\"/Version=\"${vers}\"/" $f
sed -i "s/Version=\"${i}\"/Version=\"${vers}\"/" $f
else
echo no change to version number for $f
fi
fi
done