You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2019/07/22 23:22:47 UTC

[hadoop] branch trunk updated: HDDS-1803. shellcheck.sh does not work on Mac

This is an automated email from the ASF dual-hosted git repository.

aengineer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d59f271  HDDS-1803. shellcheck.sh does not work on Mac
d59f271 is described below

commit d59f2711e0f47befc536ad05442d098862e88cef
Author: Doroszlai, Attila <ad...@apache.org>
AuthorDate: Tue Jul 16 05:06:26 2019 +0200

    HDDS-1803. shellcheck.sh does not work on Mac
    
    Signed-off-by: Anu Engineer <ae...@apache.org>
---
 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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org