#!/bin/bash
set -euo pipefail
BASE=/root/assets/driftwoodxi
REPO=$BASE/driftwoodxi-steamdeck.git
rm -rf "$REPO"
mkdir -p "$REPO"
git init --bare "$REPO"
git -C "$REPO" config http.receivepack false
git -C "$REPO" config http.uploadpack true
cat > "$REPO/hooks/post-update" <<'HOOK'
#!/bin/sh
exec git update-server-info
HOOK
chmod +x "$REPO/hooks/post-update"
touch "$REPO/git-daemon-export-ok"
echo bare_ok
