#!/bin/sh

# $Id$

# Change boinc version number in configure.ac and generate files.

# syntax: set-version 7.17

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

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

if [ "$1" ]; then
    echo "Setting BOINC version to $1."

    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

cmd ./_autosetup -c
