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,13 +55,18 @@ 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 | ||||
|     if [[ "$confname" == */* ]] || [[ "$confname" == *.* ]]; then | ||||
|         local d="$(abspath "$(dirname -- "$confname")")" | ||||
|         if [ "$d" != "$confdir" ]; then | ||||
|             CONFNAME="$confname" | ||||
|             SFILE="$CONFNAME" | ||||
|             DFILE="${CONFNAME%.conf}.vars" | ||||
|     else | ||||
|             return | ||||
|         fi | ||||
|         confname="$(basename -- "$confname" .conf)" | ||||
|     fi | ||||
|     CONFNAME="${confname:-deploy}" | ||||
|     SFILE="$confdir/$CONFNAME.conf" | ||||
|     if is_root; then | ||||
| @ -70,7 +74,6 @@ function deploy_setconf() { | ||||
|     else | ||||
|         DFILE="$HOME/etc/deploy/$CONFNAME.vars" | ||||
|     fi | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| function deploy_loadconf() { | ||||
| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user