profils pour docker-machine

This commit is contained in:
Jephté Clain 2018-11-16 16:25:33 +04:00
parent a9004fa1d2
commit 45c6422e62
2 changed files with 15 additions and 0 deletions

12
dk
View File

@ -280,9 +280,21 @@ function auto_down() {
DEFAULT_PROFILE=devel DEFAULT_PROFILE=devel
PROFILE= PROFILE=
DM_PROFILES=()
set_defaults dk set_defaults dk
export PROFILE export PROFILE
if progexists docker-machine; then
setx active_dm=docker-machine active
for dm_profile in "${DM_PROFILES[@]}"; do
splitpair "$dm_profile" dm profile
if [ "$dm" == "$active_dm" ]; then
DEFAULT_PROFILE="$profile"
break
fi
done
fi
chdir= chdir=
args=( args=(
--help '$exit_with display_help' --help '$exit_with display_help'

View File

@ -2,3 +2,6 @@
# Profil par défaut # Profil par défaut
#PROFILE=prod #PROFILE=prod
# Profiles pour docker-machine
#DM_PROFILES=(name:profile...)