From 677fdca805bc4648c776279e7c2ad8ffcea1193b Mon Sep 17 00:00:00 2001 From: Casey Bisson Date: Fri, 2 Jun 2017 08:47:24 -0700 Subject: [PATCH] add option to show profile don't show profile by default --- triton-docker | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) mode change 100644 => 100755 triton-docker diff --git a/triton-docker b/triton-docker old mode 100644 new mode 100755 index f79c962..d09a800 --- a/triton-docker +++ b/triton-docker @@ -23,7 +23,7 @@ function currentProfile () { local profile_source='default; use `triton profile set ` to change' fi - echo "Executing in '$(triton profile get | awk 'NR == 1 {print $2}')' (${profile_source}) at $(date +'%r')" + echo "Executing in '$(triton profile get | awk 'NR == 1 {print $2}')' (${profile_source})" } # Check if the Docker binary (named triton-docker-helper) @@ -74,10 +74,17 @@ function install () { # Run all checks function checkAll () { checkTritonInstalled && - checkDockerInstalled && - currentProfile + checkDockerInstalled } +# Special case handling if the sub-command is `profile` +if [ "profile" == "$1" ] +then + currentProfile + exit 1 +fi + +# Change behavior based on the calling name of this executable case "`basename $0`" in triton-docker) checkAll &&