Allow overriding the STACK_NAME..
..to be able to run e.g. `abra -a traefik logs traefik`
This commit is contained in:
parent
348e4ca255
commit
ea79ad809a
7
abra
7
abra
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user