# des infos quand on est dans un dépôt versionné
find_up () {
+ local path normalized_path normalized_ret
path="$1"
shift 1
- while [[ "`readlink -f -- \"$path\"`" != "/" ]];
+ normalized_path=`readlink -f -- "$path"`
+ normalized_ret=$?
+ while [[ "$normalized_path" != "/" ]] && [ $normalized_ret -eq 0 ];
do
find "$path" -maxdepth 1 -mindepth 1 "$@"
path=${path}/..
+ normalized_path=`readlink -f -- "$path"`
+ normalized_ret=$?
done
}