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 new features
Add support for option -n (no submodules) Add support for project directory argument Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9440355423
commit
3995287a46
1 changed files with 9 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ list_dirents_cvs()
|
|||
list_dirents_git()
|
||||
{
|
||||
git ls-files $1
|
||||
git submodule foreach 'git ls-files | sed "s|^|$path/|"'
|
||||
[ "$opt_no_submodules" = 1 ] || git submodule foreach 'git ls-files | sed "s|^|$path/|"'
|
||||
}
|
||||
|
||||
list_dirents()
|
||||
|
|
@ -53,16 +53,23 @@ list_dirents()
|
|||
list_dirents_git $1
|
||||
}
|
||||
|
||||
set -- `getopt f "$@"`
|
||||
set -- `getopt fn "$@"`
|
||||
|
||||
while [ "$1" != -- ]; do
|
||||
case $1 in
|
||||
-f)
|
||||
opt_only_regular_files=1
|
||||
;;
|
||||
-n)
|
||||
opt_no_submodules=1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
proj_dir="$1"
|
||||
[ "$proj_dir" ] && cd $proj_dir
|
||||
|
||||
list_dirents . | sort
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue