set-version 492 Bytes
Newer Older
Karl Chen's avatar
Karl Chen committed
1 2 3 4
#!/bin/sh

# $Id$

Karl Chen's avatar
Karl Chen committed
5 6 7
# Change boinc version number in configure.ac and generate files.

# syntax: set-version 7.17
Karl Chen's avatar
Karl Chen committed
8 9 10 11 12 13 14 15 16 17 18 19

die()
{
    echo "$@" >&2
    exit 1
}

cmd()
{
    "$@" || die "couldn't $*"
}

Karl Chen's avatar
Karl Chen committed
20 21
if [ "$1" ]; then
    echo "Setting BOINC version to $1."
Karl Chen's avatar
Karl Chen committed
22

Karl Chen's avatar
Karl Chen committed
23 24 25 26 27
    cmd mv configure.ac configure.ac.old
    cmd sed "s/^AC_INIT.*/AC_INIT(BOINC, $1)/" configure.ac.old > configure.ac
else
    echo "Updating files for BOINC version (assuming you manually changed configure.ac)"
fi
Karl Chen's avatar
Karl Chen committed
28 29

cmd ./_autosetup -c