mirror of
https://github.com/cculianu/Fulcrum.git
synced 2026-08-18 13:09:12 +02:00
* 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
29 lines
707 B
Bash
Executable file
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
|