diff --git a/scripts/list-cvs-files.sh b/scripts/list-cvs-files.sh index 83c79869..eb929257 100644 --- a/scripts/list-cvs-files.sh +++ b/scripts/list-cvs-files.sh @@ -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 +