justfiles for automating various tasks on my workstation

~blogging.just

Changed files
+5 -11
+5 -11
blogging.just
···
#!/usr/bin/env bash
DATE=$(date '+%Y-%m-%d')
TAGS="$@"
-
FEELSDIR="${HOME}/nextcloud/sites/feels.hyperreal.coffee"
+
FEELSDIR="${HOME}/repos/tildegit.org/hyperreal/feelslog"
PREV_ENTRY=$(find "$FEELSDIR/src" -name "*.md" -exec basename {} \; | sort | tail -1 | cut -c 18-21)
NEXT_ENTRY="00$(echo "$PREV_ENTRY" + "1" | bc)"
NEXT_ENTRY_FILENAME="${FEELSDIR}/src/${DATE}-entry-${NEXT_ENTRY}.md"
···
if [ ! -d "$BSSG_DIR" ]; then
mkdir -p "${HOME}/repos/brew.bsd.cafe/stefano"
git clone https://brew.bsd.cafe/stefano/BSSG.git "$BSSG_DIR"
+
else
+
cd "$BSSG_DIR" || exit 1
+
git pull
fi
-
FEELS_CONFIG="${HOME}/nextcloud/sites/feels.hyperreal.coffee/config.sh.local"
-
OUTPUT_DIR="${HOME}/nextcloud/sites/feels.hyperreal.coffee/output"
-
SITE_URL="https://feels.hyperreal.coffee"
-
REMOTE_USER="jas"
-
REMOTE_HOST="hyperreal.carp-wyvern.ts.net"
-
REMOTE_PATH="/home/jas/public/feels"
-
cd "$BSSG_DIR"
+
FEELS_CONFIG="${HOME}/repos/tildegit.org/hyperreal/feelslog/config.sh.local"
"${BSSG_DIR}/bssg.sh" build --config "$FEELS_CONFIG"
-
rsync -az --delete "$OUTPUT_DIR"/ "${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}"
-
echo
-
echo "Site deployed successfully"
# vim: ts=4 sts=4 sw=4 et ft=just