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 option -t (text-files)
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
48735e0c10
commit
0b2df04c6b
1 changed files with 9 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ list_dirents()
|
|||
list_dirents_git $1
|
||||
}
|
||||
|
||||
set -- `getopt fnz "$@"`
|
||||
set -- `getopt fnzt "$@"`
|
||||
|
||||
while [ "$1" != -- ]; do
|
||||
case $1 in
|
||||
|
|
@ -77,6 +77,9 @@ case $1 in
|
|||
git_ls_files_opts="$git_ls_files_opts -z"
|
||||
opt_sort="$opt_sort -z"
|
||||
;;
|
||||
-t)
|
||||
text_files=1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
|
@ -85,5 +88,9 @@ shift
|
|||
proj_dir="$1"
|
||||
[ "$proj_dir" ] && cd $proj_dir
|
||||
|
||||
list_dirents . | sort $opt_sort
|
||||
if [ "$text_files" ]; then
|
||||
list_dirents . | sort $opt_sort | xargs file -N | grep ":.*text" | cut -d: -f1
|
||||
else
|
||||
list_dirents . | sort $opt_sort
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue