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
This commit is contained in:
Bart Van Assche
2018-11-04 01:04:49 +00:00
parent ac78b5fb12
commit 14dc6b5c7c
+8 -12
View File
@@ -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
)