Allow overriding the STACK_NAME..
continuous-integration/drone/push Build is failing Details

..to be able to run e.g. `abra -a traefik logs traefik`
This commit is contained in:
3wc 2020-09-11 12:58:59 +02:00
parent 348e4ca255
commit ea79ad809a
1 changed files with 6 additions and 1 deletions

7
abra
View File

@ -12,7 +12,7 @@ if type direnv 2>&1 > /dev/null && ! direnv status | grep -q 'Found RC allowed t
fi
sub_help(){
echo "Usage: $PROGRAM_NAME <subcommand> [options]"
echo "Usage: $PROGRAM_NAME [-a STACK_NAME] <subcommand> [options]"
echo ""
echo "Subcommands:"
echo " run SERVICE [CMD] run a command in the specified service's container"
@ -93,6 +93,11 @@ sub_logs (){
--timestamps
}
if [ $1 == "-a" ]; then
STACK_NAME=$2
shift 2
fi
subcommand=$1
case $subcommand in
"" | "-h" | "--help")