Add post-receive sample hook

This commit is contained in:
Antonia 2024-09-06 11:16:54 +02:00
parent 9d53c7d292
commit 2f0ac6bb76
2 changed files with 11 additions and 0 deletions

8
scripts/post-receive.sample Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
temp=$(mktemp -d)
outdir=/var/www/html/$(basename $(pwd))
mkdir -p $outdir
git --work-tree=$temp --git-dir=$GIT_DIR checkout -f
~/scripts/mapbuilder.sh $temp $outdir
cp $temp/layers.json $outdir
rm -r $temp