This is an automated email from the ASF dual-hosted git repository.
aengineer pushed a commit to branch ozone-0.4.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/ozone-0.4.1 by this push:
new 697338d HDDS-1803. shellcheck.sh does not work on Mac
697338d is described below
commit 697338dd824dc458774410177bf0439c95f5557c
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Jul 16 05:06:26 2019 +0200
HDDS-1803. shellcheck.sh does not work on Mac
Signed-off-by: Anu Engineer <[email protected]>
(cherry picked from commit d59f2711e0f47befc536ad05442d098862e88cef)
---
hadoop-ozone/dev-support/checks/shellcheck.sh | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hadoop-ozone/dev-support/checks/shellcheck.sh
b/hadoop-ozone/dev-support/checks/shellcheck.sh
index 1284acd..637a4f8 100755
--- a/hadoop-ozone/dev-support/checks/shellcheck.sh
+++ b/hadoop-ozone/dev-support/checks/shellcheck.sh
@@ -19,9 +19,14 @@ cd "$DIR/../../.." || exit 1
OUTPUT_FILE="$DIR/../../../target/shell-problems.txt"
mkdir -p "$(dirname "$OUTPUT_FILE")"
echo "" > "$OUTPUT_FILE"
-find "./hadoop-hdds" -type f -executable | grep -v target | grep -v
node_modules | grep -v py | xargs -n1 shellcheck | tee "$OUTPUT_FILE"
-find "./hadoop-ozone" -type f -executable | grep -v target | grep -v
node_modules | grep -v py | xargs -n1 shellcheck | tee "$OUTPUT_FILE"
-
+if [[ "$(uname -s)" = "Darwin" ]]; then
+ find hadoop-hdds hadoop-ozone -type f -perm '-500'
+else
+ find hadoop-hdds hadoop-ozone -type f -executable
+fi \
+ | grep -v -e target/ -e node_modules/ -e '\.\(ico\|py\|yml\)$' \
+ | xargs -n1 shellcheck \
+ | tee "$OUTPUT_FILE"
if [ "$(cat "$OUTPUT_FILE")" ]; then
exit 1
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]