1
0
forked from cafe/site
cafe-site/webhook.cgi
2021-10-10 22:13:10 +03:00

11 lines
271 B
Bash
Executable File

#!/bin/sh
exec 2>&1
printf "Content-Type: text/plain\r\n\r\n"
#env
if [ -n "$CONTENT_TYPE" ] && [ -n "$HTTP_X_GITEA_EVENT" ] && [ "$CONTENT_TYPE"="application/json" ] && [ "$HTTP_X_GITEA_EVENT"="push" ];then
echo "rebuilding"
../build.sh
else
echo "incorrect data"
fi