File: update-version.sh

package info (click to toggle)
yadifa 3.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,392 kB
  • sloc: ansic: 254,102; makefile: 1,409; pascal: 971; sh: 706
file content (20 lines) | stat: -rwxr-xr-x 642 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")

version=$(cat $SCRIPTPATH/../VERSION)

cd $SCRIPTPATH

echo version: $version

for f in *.example *.conf
do
	echo processing version of $f
	sed -i -e "s/\"[1-3]\\.[0-9]*[0-9]\\.[0-9]*[0-9]\"/\"$version\"/" -e "s/yadifa-[1-3]\\.[0-9]*[0-9]\\.[0-9]*[0-9]/yadifa-$version/" -e "s/since [1-3]\\.[0-9]*[0-9]\\.[0-9]*[0-9]/since $version/"  $f
done

echo Fixing CMakeLists.txt
sed -i -e "s/read_version(\".*\")/read_version(\"$version\")/" -e "s/set(PACKAGE_VERSION\s.*)/set(PACKAGE_VERSION \"$version\")/" -e "s/set(VERSION\s.*)/set(VERSION \"$version\")/" ../CMakeLists.txt