File: replace_since.sh

package info (click to toggle)
ocaml-batteries 3.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,104 kB
  • sloc: ml: 44,518; sh: 146; makefile: 96; ansic: 30; lisp: 15
file content (17 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env sh

# Replace annotations of the form @since NEXT_RELEASE by the
# version number given on the command line

VERSION="$1"

echo "version number: $VERSION"

if [ -z "$VERSION" ] ; then
    echo "please give a version number, for example:"
    echo "sh scripts/replace_since.sh 2.8.0"
    exit 1
fi

sed -e "s/NEXT_RELEASE/$VERSION/" -i '' VERSION
find src/ -name '*.ml*' -exec sed -e "s/NEXT_RELEASE/$VERSION/g" -i '' {} \;