File: increment_apiversion.sh

package info (click to toggle)
papilo 2.4.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,220 kB
  • sloc: cpp: 41,705; fortran: 4,032; f90: 3,203; python: 1,390; sh: 1,221; ansic: 986; xml: 276; makefile: 152
file content (14 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

cmakefile=`dirname $0`/../CMakeLists.txt
dummyconfig=`dirname $0`/../src/papilo/Config.hpp

lineapiversion=$(sed -n '/PAPILO_API_VERSION/p' $cmakefile)

version=$(echo "$lineapiversion" | grep -o -E '[0-9]+')

echo "Raising to API version $((version + 1))!"

sed -i "s/^set(PAPILO_API_VERSION .*/set(PAPILO_API_VERSION $((version + 1)))/g" $cmakefile

sed -i "s/^#define PAPILO_API_VERSION .*/#define PAPILO_API_VERSION $((version + 1))/g" $dummyconfig