Files
2026-10-21 18:49:22 -04:00

23 lines
434 B
Bash
Executable File

#!/bin/bash
function usage() {
echo "$0 <recipe> <service> <command>: run a command on all instances of a recipe"
}
recipe=$1
service=$2
command=$3
if [ -z "$recipe" ] || [ -z "$service" ] || [ -z "$command" ]; then
usage
exit 1
fi
readarray -t apps < <(abra app ls -r "$recipe" -m | jq -r '.[].apps[].appName')
for app in "${apps[@]}"; do
echo -n "$app: "
eval "abra app run $app -- $service $command"
echo ""
done