From 14dc6b5c7c671824b85628e63e66c9672e63136b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 01:04:49 +0000 Subject: [PATCH] scripts: Merge r7343 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7604 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/list-source-files | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/list-source-files b/scripts/list-source-files index 21320d197..f1f3e2684 100755 --- a/scripts/list-source-files +++ b/scripts/list-source-files @@ -1,29 +1,25 @@ #!/bin/bash -inode() { - ls -id "$1" | { read a b; echo "$a"; } -} - list_source_files() { local d r d="$(cd "$1" && echo "$PWD")" r="$d" - inode_root="$(inode /)" - while [ $(inode "$r") != "${inode_root}" -a \ - ! -e "$r/.svn" -a ! -e "$r/.git" -a ! -e "$r/.hg" ]; do - r="$r/.." + while [ "$r" != "/" ] && [ ! -e "$r/.svn" ] && [ ! -e "$r/.git" ] && + [ ! -e "$r/.hg" ]; do + r="$(dirname "$r")" done if [ -e "$r/.svn" ]; then ( - cd "$d" + cd "$d" || exit $? svn status -v | \ grep -vE '^[D?]|^Performing|^$' | \ - cut -c41- | \ - while read f; do + cut -c3- | \ + while read -r a b c f; do if [ -f "$f" ]; then - echo "$f" + echo "$a $b $c" >/dev/null + echo "$f" fi done )