This is an automated email from the ASF dual-hosted git repository.
style95 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-release.git
The following commit(s) were added to refs/heads/master by this push:
new c934b14 exclude empty files in the find command; not by mime type
(#302)
c934b14 is described below
commit c934b146b51f00086b51b72d73417b7a19f67f2b
Author: David Grove <[email protected]>
AuthorDate: Wed Sep 18 22:25:47 2019 -0400
exclude empty files in the find command; not by mime type (#302)
Apparently the mime type reported by file of a zero byte file
is platform dependent; so it is better to use a smarter find
command than to filter out later...
---
tools/rcverify.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/rcverify.sh b/tools/rcverify.sh
index b741bf5..a43f4f9 100755
--- a/tools/rcverify.sh
+++ b/tools/rcverify.sh
@@ -175,7 +175,7 @@ EXE=$(find "$DIR/$BASE" -type f ! -name "*.sh" ! -name
"*.sh" ! -name "*.py" ! -
validate "$EXE" "" "$EXE"
printf "scanning for unexpected file types..."
-EXE=$(find "$DIR/$BASE" -type f -exec file --mime {} \; | grep -v ": text/" |
grep -v ": inode/x-empty" | grep -v ": image/")
+EXE=$(find "$DIR/$BASE" -type f -and -not -empty -exec file --mime {} \; |
grep -v ": text/" | grep -v ": image/")
validate "$EXE" "" "$EXE"
printf "scanning for archives..."