Fulcrum/contrib/bump-version.sh
Jonny Heggheim 67567b7173 Added unix man page (#19)
* First attemt at making a man page in markdown

* Use same format on headings as readme.md

* Use the author of the software instead of the man file

* Include the man-page for RPM

* Better metadata

* Added unix man file to bump version and also bumped the version to 1.0.1 for the man file
2020-01-19 21:07:22 +02:00

29 lines
707 B
Bash
Executable file

#!/bin/sh
SED=sed
# On macOS "sed" won't work, because it's some strange BSD version
# so must insist on gsed or die.
if [ `uname` == "Darwin" ]; then
if (which gsed > /dev/null); then
SED=gsed
else
echo "Please install gsed on macOS to use this script."
exit 1
fi
fi
version="$1"
if [ -z "$version" ]; then
echo "Usage: $0 <new version>"
exit 1
fi
$SED -i "/^#define VERSION .*/c\#define VERSION \"$version\"" src/Common.h
$SED -i "/^Version: .*/c\Version: $version" contrib/rpm/fulcrum.spec
#man page
_date=$(date '+%B %d, %Y')
$SED -i "1s/\%.*/\% FULCRUM\(1\) Version $version \| Fulcrum Manual/" doc/unix-man-page.md
$SED -i "3s/\%.*/\% $_date/" doc/unix-man-page.md