X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Ftrigger-wrapper;h=c3772da42f18cbc16e84db2c8f2880511f0d3ee1;hb=1fa3e310692f1499af36eb54526f2e23766847d5;hp=5208c22072b4a896e5ecfe06b4e4c775edb92cac;hpb=abdf03d4c2d1b454e6d3dcc771d037a0abe8a7ab;p=wannabuild.git diff --git a/bin/trigger-wrapper b/bin/trigger-wrapper index 5208c22..c3772da 100755 --- a/bin/trigger-wrapper +++ b/bin/trigger-wrapper @@ -8,16 +8,25 @@ set -- $SSH_ORIGINAL_COMMAND shift args="$*" +args=${args//[^a-zA-Z-]/} +args=${args,,} + +# Ignore ftpsync stuff. +if [ "$args" = "syncall" -o "$args" = "sync:all" ] +then + args="" +fi echo "$(date): $trigger_name | $args" >> /org/wanna-build/db/signal.log if [ ! -z "$args" ] then - # Append because we might get triggered for multiple suites. - # (This is mainly for security currently.) - echo $args >> /org/wanna-build/signals/$trigger_name + # Pass arguments in the filename because we might get triggered for + # multiple suites. A simple append wouldn't be race-free on the + # reader side. + touch "/org/wanna-build/signals/${trigger_name}.${args}" else - touch /org/wanna-build/signals/$trigger_name + touch "/org/wanna-build/signals/$trigger_name" fi exit 0