mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
list-cvs-files.sh: Add support for git
This commit is contained in:
parent
ad5565c8b9
commit
8267616763
1 changed files with 19 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ filter_deleted()
|
|||
done
|
||||
}
|
||||
|
||||
list_dirents()
|
||||
list_dirents_cvs()
|
||||
{
|
||||
local dirs=`sed '/^D\// !d; s%^D/%%; s%/.*%%' $1/CVS/Entries`
|
||||
dirs="`filter_deleted $1/CVS/Entries $dirs`"
|
||||
|
|
@ -28,10 +28,27 @@ list_dirents()
|
|||
done
|
||||
for d in $dirs; do
|
||||
[ "$opt_only_regular_files" != 1 ] && echo $1/$d
|
||||
list_dirents $1/$d
|
||||
list_dirents_cvs $1/$d
|
||||
done
|
||||
}
|
||||
|
||||
list_dirents_git()
|
||||
{
|
||||
git ls-files $1
|
||||
}
|
||||
|
||||
list_dirents()
|
||||
{
|
||||
if [ -d $1/CVS ]; then
|
||||
list_dirents_cvs $1
|
||||
elif [ -d $1/.git ]; then
|
||||
list_dirents_git $1
|
||||
else
|
||||
echo "failed to list versioned files in $1: no VCS" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
set -- `getopt f "$@"`
|
||||
|
||||
while [ "$1" != -- ]; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue