billing frontend for mariadb. setup as otb_billing for outsidethebox.top accounting. also involved with outsidethedb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
555 B

#!/usr/bin/env bash
set -euo pipefail
PROJECT_DIR="/home/def/otb_billing"
STATE_FILE="$PROJECT_DIR/PROJECT_STATE.md"
if [ ! -f "$STATE_FILE" ]; then
echo "ERROR: $STATE_FILE not found"
exit 1
fi
VERSION="${1:-}"
if [ -z "$VERSION" ]; then
VERSION="$(grep -m1 '^Version:' "$STATE_FILE" | sed 's/^Version:[[:space:]]*//')"
fi
TODAY="$(date +%F)"
sed -i \
-e "s/^Last Updated: .*/Last Updated: $TODAY/" \
-e "s/^Version: .*/Version: $VERSION/" \
"$STATE_FILE"
echo "Updated $STATE_FILE"
echo "Last Updated: $TODAY"
echo "Version: $VERSION"