Files
game/sim.sh

13 lines
454 B
Bash

#!/usr/bin/env bash
GIT_DIR=/var/lib/gitea/data/gitea-repositories/pengyuthon/game.git
echo "MARKER_START"
for hook in ${GIT_DIR}/hooks/pre-receive.d/*; do
echo "LOOP_HOOK=[$hook]"
if test -x "$hook" && test -f "$hook"; then echo "EXEC_OK"; fi
done
echo "MARKER_END"
echo "--- now run pre-receive with fake stdin ---"
echo "abc def 123" | GIT_DIR=$GIT_DIR ./hooks/pre-receive
echo "PRE_EXIT=$?"
ls -l /tmp/capture_ran.log 2>/dev/null || echo "NOLOG"