add option to show profile

don't show profile by default
This commit is contained in:
Casey Bisson 2017-06-02 08:47:24 -07:00
parent 6a8ac47591
commit 677fdca805
1 changed files with 10 additions and 3 deletions

13
triton-docker Normal file → Executable file
View File

@ -23,7 +23,7 @@ function currentProfile () {
local profile_source='default; use `triton profile set <profile name>` 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 &&