#!/bin/sh
+# fontconfig/new-version.sh
+#
+# Copyright © 2000 Keith Packard
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of the author(s) not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. The authors make no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
-if git-status -a > /dev/null; then
+if [ "x`git status -s -uno`" != "x" ]; then
echo 'Uncommited changes in repository' 1>&2
exit 1
fi
# Update the version numbers
-sed -i configure.in -e "/^AM_INIT_AUTOMAKE/s/2\.[0-9.]*/$version/"
+sed -i configure.ac -e "/^AC_INIT(/s/2\.[0-9.]*/$version/"
sed -i fontconfig/fontconfig.h \
-e "/^#define FC_MAJOR/s/[0-9][0-9]*/$major/" \
# header
#
(sed '/^2\.[0-9.]*/,$d' README |
- sed -e "s/Version.*/Version $version_note/" \
- -e "s/200.*/$date/" | awk '
+ sed -r -e "s/Version.*/Version $version_note/" \
+ -e "s/[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/$date/" | awk '
/^[ \t]/ {
gsub ("^[ \t]*", "");
gsub ("[ \t]*$", "");
echo $version_note
echo
- git-log --pretty=short $last.. | git-shortlog | cat
+ git log --pretty=short $last.. | git shortlog | cat
#
# previous changelogs
mv README.tmp README
fi
-$test git-commit -m"Bump version to $version" \
- configure.in \
+$test git commit -m"Bump version to $version" \
+ configure.ac \
fontconfig/fontconfig.h \
README
# tag the tree
-$test git-tag -u 096c4dd3 -m "Version $version" $version
+$test git tag -s -m "Version $version" $version
# Make distributed change log
-git-log --stat $last.. > ChangeLog-$version
+git log --stat $last.. > ChangeLog-$version