πΎ Archived View for going-flying.com βΊ files βΊ deploy captured on 2023-04-26 at 13:53:10.
β¬ οΈ Previous capture (2020-09-24)
β‘οΈ Next capture (2024-06-16)
-=-=-=-=-=-=-
#!/bin/sh # going-flying.com post-receive hook for gemini:// # (c) 2016-2020 Matthew J. Ernisse <matt@going-flying.com> # All Rights Reserved. # # Update the on-disk representation of my capsule when I push a new # revision up to the git repository. set -e BRANCH="" BUILD_DIR="/var/gemini" GIT_DIR=$(git rev-parse --git-dir 2>/dev/null) REV=0 while read oldrev newrev refname; do BRANCH="$refname" REV="$newrev" done if [ "$BRANCH" != "refs/heads/master" ]; then echo "detected $BRANCH, aborting" exit 0 fi if [ -z "$GIT_DIR" ]; then echo >&2 "fatal: post-receive GIT_DIR not set" exit 1 fi cat << EOF Β»^ \ Ζ L ββββ β β ββββββb ΒΌ / ,ββββββ ββββββββ )Ξ ββ βββββ β«βββββββ ] β Ξ¦ββββββ ββββββββ β b "β βββΒ¬ ββββββββ β ] ββ βββββββββ β ββββββββββ ββ Ξ ββββββββββββββ ,Β¬ ββββββββββββββββ ]βββββββββββββββββ ββββββββββββββββββ ]ββββββββββββββββββ βββββββββββββββββββ β«βββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββββ ββββββββββββββββββββββ ,ββββββββββββββββββββββ βββββββββββββββββββββββΒ΅ βββββββββββββββββββ EOF umask 0022 if [ ! -d "$BUILD_DIR" ]; then echo "Creating $BUILD_DIR" mkdir -- "$BUILD_DIR" chgrp www-data "$BUILD_DIR" chmod 664 "$BUILD_DIR" fi echo "updating $BUILD_DIR" GIT_WORK_TREE=$BUILD_DIR git checkout -f $BUILD_DIR/build/build.py "$BUILD_DIR/users/mernisse/" echo "setting rev to $REV" sed -e "s/GIT_REV/${REV}/" "$BUILD_DIR/how-built.gmi" > \ "$BUILD_DIR/how-built.gmi.new" mv $BUILD_DIR/how-built.gmi.new $BUILD_DIR/how-built.gmi echo "site deployed."