2018-06-16 16:39:54 +00:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
build_name=$1
|
|
|
|
map_file=$build_name.map
|
|
|
|
if [ ! -f $map_file ]; then
|
|
|
|
echo "$map_file does not exist!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
|
2021-10-30 00:27:58 +00:00
|
|
|
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`\\n$build_name progress:\\n$output\\n\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL"
|