Annotation of freem/scripts/set-version, revision 1.1
1.1 ! snw 1: #!/bin/bash
! 2:
! 3: if [[ ! -f sem.ver ]]
! 4: then
! 5: echo "Not in the root of the FreeM repository."
! 6: exit 1
! 7: fi
! 8:
! 9: CURVER=$(cat sem.ver)
! 10: OLDVER=$(cat ver.old)
! 11: NEWVER=$1
! 12:
! 13: if [[ $# == 0 ]]
! 14: then
! 15: echo "set-version: assuming new version is \"cvs-current\""
! 16: NEWVER="cvs-current"
! 17: fi
! 18:
! 19:
! 20: if [[ "${CURVER}" == "${NEWVER}" ]]
! 21: then
! 22: echo "set-version: no change"
! 23: exit 1
! 24: fi
! 25:
! 26: echo "set-version: version change ${CURVER} => ${NEWVER}"
! 27: echo "set-version: backing up old version"
! 28: cp sem.ver ver.old
! 29:
! 30: echo "${NEWVER}" > sem.ver
! 31:
! 32: sed -i.orig "s/${CURVER}/${NEWVER}/g" doc/freem.texi
! 33: sed -i.orig "s/${CURVER}/${NEWVER}/g" configure.ac
! 34:
! 35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>