From cb855ab53635426e657e501cc475ae74551fbba1 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 19 Oct 2007 13:34:36 -0300 Subject: [PATCH] Changed bin/sde-list-files to resolve package names and target names before $PWD relative matches --- bin/sde-list-files | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/bin/sde-list-files b/bin/sde-list-files index e171be8..7174f45 100755 --- a/bin/sde-list-files +++ b/bin/sde-list-files @@ -81,23 +81,21 @@ print_file_root() { for x; do y= - if [ -e "$x" ]; then - if [ "${x:0:1}" == "/" ]; then - # absolute - y="$x" - else - # $PWD relative - y="$PWD/$x" - fi - elif [ -e "$SDEROOT/$x" ]; then - # $SDEROOT relative - y="$SDEROOT/$x" + if [ "${x:0:1}" == "/" -a -e "$x" ]; then + # absolute + y="$x" elif [ -e "$SDEROOT/package"/*/"$x" ]; then # package name y=$( echo "$SDEROOT/package"/*/"$x" ) elif [ -e "$SDEROOT/target/$x" ]; then - # package name + # target name y="$SDEROOT/target/$x" + elif [ -e "$SDEROOT/$x" ]; then + # $SDEROOT relative + y="$SDEROOT/$x" + else [ -e "$x" ] + # $PWD relative + y="$PWD/$x" fi # canonicalize