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