update_version.sh 612 Bytes
Newer Older
1 2
#!/bin/sh

Ulrich Kemloh's avatar
Ulrich Kemloh committed
3
old_version='v0.7'
Ulrich Kemloh's avatar
Ulrich Kemloh committed
4
new_version='v0.8'
Ulrich Kemloh's avatar
Ulrich Kemloh committed
5

6

7 8 9
#old_version='http://134.94.2.137/jps_ini_core.xsd'
#new_version='http://xsd.jupedsim.org/0.6/jps_ini_core.xsd'

Ulrich Kemloh's avatar
Ulrich Kemloh committed
10 11
#for f in $(find ../ -name '*.cpp' -or -name '*.h' -or -name '*.xml' -or -name '*.py');
for f in $(find ../ -name '*.cpp' -or -name '*.h' );  
12 13 14 15
do 

#file uptodate
if grep -R -q "$new_version" $f; then
Ulrich Kemloh's avatar
Ulrich Kemloh committed
16
	#echo "File $f is uptodate"
17 18 19 20 21
	continue
fi

if grep -R -q "$old_version" $f; then
	echo "Processing $f  $old_version ---> $new_version"
Ulrich Kemloh's avatar
Ulrich Kemloh committed
22
#	sed -i "s/${old_version}/${new_version}/g" $f
23
else
24
	echo "File $f does not contain a version number"
25 26 27
fi
done