mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 05:36:22 +00:00
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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user