File: update-version.sh

package info (click to toggle)
cadical 2.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,216 kB
  • sloc: cpp: 36,901; ansic: 4,521; sh: 1,770; makefile: 91
file content (12 lines) | stat: -rwxr-xr-x 411 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
cd `dirname $0`
NEW="`cat ../VERSION`"
OLD="`awk '/define VERSION/{print \$4}' ../src/version.cpp|sed -e 's,\",,g'`"
if [ x"$OLD" = x"$NEW" ]
then
  echo "same version '$NEW' in 'VERSION' and '../src/version.cpp'"
else
  echo "found new version '$NEW' in '../VERSION'"
  echo "updating old version '$OLD' in '../src/version.cpp'"
  sed -i -e '/define VERSION/s,".*",'\""$NEW"\", ../src/version.cpp
fi