This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
function handle_event() { | |
local entry="$1" | |
local action=$(echo $entry | jq -r '.action') | |
local service=$(echo $entry | jq -r '.service') | |
local hook="./hooks/$service/$action" | |
if [ -x "$hook" ]; then | |
"$hook" "$entry" |