diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-11-15 09:56:04 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-11-15 09:56:04 +0100 |
commit | cd5b734cf8a2d7b390fe959be21b54e3c1e329a8 (patch) | |
tree | cddcf5f021a1ca616f90c02018bf3078a9b6e1b6 /easy_e17.sh | |
parent | c837cc79a79484006733f5c1beec671724c9a32e (diff) | |
download | bin-cd5b734cf8a2d7b390fe959be21b54e3c1e329a8.zip bin-cd5b734cf8a2d7b390fe959be21b54e3c1e329a8.tar.gz |
easy_e17.sh: fix find_local_path so is not bothered by
Diffstat (limited to 'easy_e17.sh')
-rwxr-xr-x | easy_e17.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/easy_e17.sh b/easy_e17.sh index eafcec1..a673b59 100755 --- a/easy_e17.sh +++ b/easy_e17.sh @@ -1002,9 +1002,10 @@ function run_command () function find_local_path () { name=$1 - path=$(find $src_path -maxdepth 5 -type d -name $name | grep -v -E "^${src_path}$" | grep -v -E "$ignore_dirs_re" | \ + re_src_path=$(echo $src_path | sed 's/\//\\\//g') + path=$(find $src_path -maxdepth 5 -type d -name $name | sed -e "s/$re_src_path//" | grep -v -E "^${src_path}$" | grep -v -E "$ignore_dirs_re" | \ while read line; do echo `echo $line | wc -c` $line; done | sort -n | head -n 1 | cut -d " " -f 2) - if [ "$path" ]; then echo "$path"; fi + if [ "$path" ]; then echo "$src_path/$path"; fi } function compile () |