afficher le profil courant
This commit is contained in:
parent
3a4cc1258d
commit
2873638aa5
15
dk
15
dk
|
@ -234,8 +234,11 @@ function auto_down() {
|
|||
fi
|
||||
}
|
||||
|
||||
DEFAULT_PROFILE=devel
|
||||
set_defaults dk
|
||||
|
||||
chdir=
|
||||
profile=devel
|
||||
profile=
|
||||
args=(+
|
||||
--help '$exit_with display_help'
|
||||
-d:,--chdir: chdir=
|
||||
|
@ -245,10 +248,11 @@ args=(+
|
|||
)
|
||||
parse_args "$@"; set -- "${args[@]}"
|
||||
|
||||
[ -n "$chdir" ] && { cd "$chdir" || die; }
|
||||
|
||||
# construire par défaut
|
||||
[ $# -eq 0 ] && set -- build
|
||||
[ -n "$profile" ] || profile="$DEFAULT_PROFILE"
|
||||
|
||||
[ -n "$chdir" ] && { cd "$chdir" || die; }
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
[ "$1" == -- ] && { shift; continue; }
|
||||
|
@ -261,6 +265,7 @@ while [ $# -gt 0 ]; do
|
|||
while [ $# -gt 0 -a "$1" != -- ]; do
|
||||
args+=("$1"); shift
|
||||
done
|
||||
enote "Profil $profile"
|
||||
auto_build "${args[@]}" || die
|
||||
;;
|
||||
s|run|start)
|
||||
|
@ -268,9 +273,11 @@ while [ $# -gt 0 ]; do
|
|||
while [ $# -gt 0 -a "$1" != -- ]; do
|
||||
args+=("$1"); shift
|
||||
done
|
||||
enote "Profil $profile"
|
||||
auto_up "${args[@]}" || die
|
||||
;;
|
||||
k|stop)
|
||||
enote "Profil $profile"
|
||||
auto_stop || die
|
||||
;;
|
||||
1|up)
|
||||
|
@ -278,6 +285,7 @@ while [ $# -gt 0 ]; do
|
|||
while [ $# -gt 0 -a "$1" != -- ]; do
|
||||
args+=("$1"); shift
|
||||
done
|
||||
enote "Profil $profile"
|
||||
auto_up "${args[@]}" && auto_logs || die
|
||||
;;
|
||||
l|logs) auto_logs || die;;
|
||||
|
@ -293,6 +301,7 @@ while [ $# -gt 0 ]; do
|
|||
while [ $# -gt 0 -a "$1" != -- ]; do
|
||||
args+=("$1"); shift
|
||||
done
|
||||
enote "Profil $profile"
|
||||
if auto_build; then
|
||||
auto_up "${args[@]}" && auto_logs || die
|
||||
else
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
# Profil par défaut
|
||||
#PROFILE=prod
|
Loading…
Reference in New Issue