deploy: requête récursive par défaut
This commit is contained in:
parent
52bb0d584f
commit
2991e63d5b
|
@ -6,6 +6,29 @@
|
|||
# API publique
|
||||
|
||||
function deploy_query() {
|
||||
deploy_query_once "$@" && return 0
|
||||
if [ -n "$QUERYVARS" ]; then
|
||||
deploy_query_recursive "$@" && return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
function deploy_query_recursive() {
|
||||
local DFILE
|
||||
for DFILE in "${QUERYVARS[@]}"; do
|
||||
(
|
||||
deploy_loadconf --no-auto-update
|
||||
deploy_query_once "$@" && exit 0
|
||||
if [ -n "$QUERYVARS" ]; then
|
||||
deploy_query_recursive "$@" && exit 0
|
||||
fi
|
||||
exit 1
|
||||
) && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function deploy_query_once() {
|
||||
# Afficher le résultat d'une requête
|
||||
local alv
|
||||
eval "set -- $(getopt -ov: -lallow-vars: -- "$@")"
|
||||
|
@ -70,10 +93,12 @@ function deploy_query() {
|
|||
deploy_show_values type otype "$format" shell alv
|
||||
deploy_show_values link ltype "$format" shell alv
|
||||
deploy_show_links "$object" "$link" "$profile" "$format" "" alv
|
||||
echo true
|
||||
return 0
|
||||
;;
|
||||
SOURCE)
|
||||
# XXX implémenter
|
||||
echo true
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
|
@ -83,6 +108,7 @@ function deploy_query() {
|
|||
deploy_show_values type otype "$format" shell alv
|
||||
deploy_show_values vs "$type" "$format" "" alv
|
||||
deploy_show_attrs "$object" "$type" "$format" alv
|
||||
echo true
|
||||
return 0
|
||||
fi
|
||||
qvals false "artifact not found"
|
||||
|
|
Loading…
Reference in New Issue