add option to show profile
don't show profile by default
This commit is contained in:
parent
6a8ac47591
commit
677fdca805
13
triton-docker
Normal file → Executable file
13
triton-docker
Normal file → Executable file
@ -23,7 +23,7 @@ function currentProfile () {
|
|||||||
local profile_source='default; use `triton profile set <profile name>` to change'
|
local profile_source='default; use `triton profile set <profile name>` to change'
|
||||||
fi
|
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)
|
# Check if the Docker binary (named triton-docker-helper)
|
||||||
@ -74,10 +74,17 @@ function install () {
|
|||||||
# Run all checks
|
# Run all checks
|
||||||
function checkAll () {
|
function checkAll () {
|
||||||
checkTritonInstalled &&
|
checkTritonInstalled &&
|
||||||
checkDockerInstalled &&
|
checkDockerInstalled
|
||||||
currentProfile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 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
|
case "`basename $0`" in
|
||||||
triton-docker)
|
triton-docker)
|
||||||
checkAll &&
|
checkAll &&
|
||||||
|
Loading…
Reference in New Issue
Block a user