quelques corrections sur deploy
This commit is contained in:
parent
20df6c462f
commit
8fa58e24e3
|
@ -19,8 +19,7 @@ function deploy_query() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ -n "$ltype" ]; then deploy_is_link "$ltype" || return 4; fi
|
if [ -n "$ltype" ]; then deploy_is_link "$ltype" || return 4; fi
|
||||||
deploy_is_profile "$profile" || return 5
|
[ -n "$term" ] || return 5
|
||||||
[ -n "$term" ] || return 6
|
|
||||||
|
|
||||||
case "$qtype" in
|
case "$qtype" in
|
||||||
DEST)
|
DEST)
|
||||||
|
@ -56,13 +55,18 @@ function deploy_query() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deploy_setconf() {
|
function deploy_setconf() {
|
||||||
local confname="$1" confdir="${2:-$scriptdir}"
|
local confname="$1" confdir="$(abspath "${2:-$scriptdir}")"
|
||||||
IFILE="$confdir/init.conf"
|
IFILE="$confdir/init.conf"
|
||||||
if [ -f "$confname" ]; then
|
if [[ "$confname" == */* ]] || [[ "$confname" == *.* ]]; then
|
||||||
|
local d="$(abspath "$(dirname -- "$confname")")"
|
||||||
|
if [ "$d" != "$confdir" ]; then
|
||||||
CONFNAME="$confname"
|
CONFNAME="$confname"
|
||||||
SFILE="$CONFNAME"
|
SFILE="$CONFNAME"
|
||||||
DFILE="${CONFNAME%.conf}.vars"
|
DFILE="${CONFNAME%.conf}.vars"
|
||||||
else
|
return
|
||||||
|
fi
|
||||||
|
confname="$(basename -- "$confname" .conf)"
|
||||||
|
fi
|
||||||
CONFNAME="${confname:-deploy}"
|
CONFNAME="${confname:-deploy}"
|
||||||
SFILE="$confdir/$CONFNAME.conf"
|
SFILE="$confdir/$CONFNAME.conf"
|
||||||
if is_root; then
|
if is_root; then
|
||||||
|
@ -70,7 +74,6 @@ function deploy_setconf() {
|
||||||
else
|
else
|
||||||
DFILE="$HOME/etc/deploy/$CONFNAME.vars"
|
DFILE="$HOME/etc/deploy/$CONFNAME.vars"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function deploy_loadconf() {
|
function deploy_loadconf() {
|
||||||
|
@ -80,7 +83,7 @@ function deploy_loadconf() {
|
||||||
[ -n "$DEPLOY_SRCDIR" ] || DEPLOY_SRCDIR=~/wop/deploy
|
[ -n "$DEPLOY_SRCDIR" ] || DEPLOY_SRCDIR=~/wop/deploy
|
||||||
[ -x "$DEPLOY_SRCDIR/query" ] && "$DEPLOY_SRCDIR/query" --nop -c "$CONFNAME"
|
[ -x "$DEPLOY_SRCDIR/query" ] && "$DEPLOY_SRCDIR/query" --nop -c "$CONFNAME"
|
||||||
); fi
|
); fi
|
||||||
[ -f "$DFILE" ] && source "$DFILE"
|
[ -f "$DFILE" ] && source "$DFILE" || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function deploy_search_artifact() {
|
function deploy_search_artifact() {
|
||||||
|
|
Loading…
Reference in New Issue