Intégration de la branche release-1.7.0
This commit is contained in:
		
						commit
						07ef5622ef
					
				| @ -1,3 +1,8 @@ | ||||
| ## Version 1.7.0 du 15/05/2015-16:11 | ||||
| 
 | ||||
| 16ad285 Intégration de la branche nutools | ||||
| 93d8262 rajouter le script nutools pour vérifier la version installée de nutools. renommer la fonction nutools() en pconf() | ||||
| 
 | ||||
| ## Version 1.6.0 du 04/05/2015-12:40 | ||||
| 
 | ||||
| 0463b2c Intégration de la branche norm_props | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| 1.6.0 | ||||
| 1.7.0 | ||||
|  | ||||
| @ -39,7 +39,7 @@ function pcd() { | ||||
|     dir="$("@@dest@@/uproject" "get$prop")" || return 1 | ||||
|     [ -n "$dir" ] && cd "$dir" | ||||
| } | ||||
| function nutools() { | ||||
| function pconf() { | ||||
|     if [ -n "$1" ]; then | ||||
|         case "$1" in | ||||
|         0|d|dis|disable) UTOOLS_AUTO=;; | ||||
| @ -83,7 +83,6 @@ function nutools() { | ||||
|         done | ||||
|     fi | ||||
| } | ||||
| function utools() { nutools "$@"; } | ||||
| 
 | ||||
| if [ -n "$UTOOLS_USSH_ALIAS" ]; then | ||||
|     function ssh() { "@@dest@@/ussh" "$@"; } | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| 008006000 | ||||
| 009000000 | ||||
|  | ||||
							
								
								
									
										78
									
								
								nutools
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										78
									
								
								nutools
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,78 @@ | ||||
| #!/bin/bash | ||||
| # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 | ||||
| source "$(dirname "$0")/lib/ulib/ulib" || exit 1 | ||||
| urequire DEFAULTS | ||||
| 
 | ||||
| function display_help() { | ||||
|     uecho "$scriptname: configurer ou afficher des informations sur nutools | ||||
| 
 | ||||
| USAGE | ||||
|     $scriptname [VERSION] | ||||
| 
 | ||||
| OPTIONS | ||||
|     -C, --configure | ||||
|         Faire la configuration pour l'utilisateur courant en appelant uenv -u | ||||
|     -v, --version | ||||
|         Afficher la version de nutools installée. C'est l'option par défaut | ||||
|     -c, --check | ||||
|         Calculer si la version installée correspond à la version spécifiée | ||||
|     -o, --oper OPERATOR | ||||
|         Spécifier l'opérateur à utiliser avec l'option --check (par défaut, | ||||
|         utiliser l'opérateur ge, qui permet de vérifier si la version minimum | ||||
|         spécifiée est installée) | ||||
|     --eq | ||||
|     --ne | ||||
|     --lt | ||||
|     --le | ||||
|     --gt | ||||
|     --ge | ||||
|     --same | ||||
|     --diff | ||||
|         Ces options sont des raccourcis. L'option '--OP' est équivalente à | ||||
|         '--check --op OP'" | ||||
| } | ||||
| 
 | ||||
| action=show | ||||
| coper= | ||||
| args=( | ||||
|     --help '$exit_with display_help' | ||||
|     -C,--configure action=configure | ||||
|     -v,--version action=show | ||||
|     -c,--check action=check | ||||
|     -o:,--oper:,--op: '$action=check; set@ coper' | ||||
|     --eq '$action=check; coper=eq' | ||||
|     --ne '$action=check; coper=ne' | ||||
|     --lt '$action=check; coper=lt' | ||||
|     --le '$action=check; coper=le' | ||||
|     --gt '$action=check; coper=gt' | ||||
|     --ge '$action=check; coper=ge' | ||||
|     --same '$action=check; coper=same' | ||||
|     --diff '$action=check; coper=diff' | ||||
| ) | ||||
| parse_args "$@"; set -- "${args[@]}" | ||||
| 
 | ||||
| case "$action" in | ||||
| configure) | ||||
|     "$scriptdir/uenv" -u | ||||
|     ;; | ||||
| show) | ||||
|     setx nutoolsver="$scriptdir/pver" -F "$scriptdir/VERSION.txt" --show | ||||
|     setx ulibver="$scriptdir/ulib" -v | ||||
|     if isatty; then | ||||
|         eecho "Répertoire d'installation: $scriptdir" | ||||
|         eecho "Version de nutools: ${COULEUR_BLEUE}$nutoolsver${COULEUR_NORMALE}" | ||||
|         eecho "Version de ulib: ${COULEUR_BLEUE}$ulibver${COULEUR_NORMALE}" | ||||
|     else | ||||
|         echo "$nutoolsver" | ||||
|     fi | ||||
|     ;; | ||||
| check) | ||||
|     [ -n "$coper" ] || coper=ge | ||||
|     cvers="$1" | ||||
|     [ -n "$cvers" ] || die "Vous devez spécifier la version pour la comparaison" | ||||
|     case "$coper" in | ||||
|     eq|ne|lt|le|gt|ge|same|diff) "$scriptdir/pver" -F "$scriptdir/VERSION.txt" "--$coper" "$cvers";; | ||||
|     *) die "$coper: Opérateur invalide";; | ||||
|     esac | ||||
|     ;; | ||||
| esac | ||||
							
								
								
									
										13
									
								
								ulib
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								ulib
									
									
									
									
									
								
							| @ -254,19 +254,24 @@ version) | ||||
|     fi | ||||
| 
 | ||||
|     if [ "$action" == show ]; then | ||||
|         echo "ulib est en version $pversion" | ||||
|         if [ -n "$system" ]; then | ||||
|             setx sversion formatversion 0 0 0 | ||||
|             sversionfile="/etc/.ulibver" | ||||
|             [ -f "$sversionfile" ] && sversion="$(<"$sversionfile")" | ||||
|             parseversion "$(<"$versionfile")" s | ||||
|             echo "/etc/ulib est en version $spversion" | ||||
|         fi | ||||
|         if isatty; then | ||||
|             eecho "ulib est en version $pversion" | ||||
|             [ -n "$system" ] && eecho "/etc/ulib est en version $spversion" | ||||
|         else | ||||
|             echo "$pversion" | ||||
|             [ -n "$system" ] && echo "$spversion" | ||||
|         fi | ||||
| 
 | ||||
|     elif [ "$action" == set ]; then | ||||
|         parsepversion "$set_version" | ||||
|         formatversion >"$versionfile" | ||||
|         echo "ulib est maintenant en version $pversion" | ||||
|         eecho "ulib est maintenant en version $pversion" | ||||
| 
 | ||||
|     elif [ "$action" == inc ]; then | ||||
|         case "$inc_version" in | ||||
| @ -276,7 +281,7 @@ version) | ||||
|         esac | ||||
|         formatversion >"$versionfile" | ||||
|         parseversion "$(<"$versionfile")" | ||||
|         echo "ulib est maintenant en version $pversion" | ||||
|         eecho "ulib est maintenant en version $pversion" | ||||
| 
 | ||||
|     elif [ "$action" == check ]; then | ||||
|         r=1 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user