site/webhook.cgi

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