github.com/cyverse/go-irodsclient@v0.13.2/tools/format.sh (about)

     1  #!/bin/bash
     2  
     3  #Exit upon failure
     4  set -e
     5  
     6  SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
     7  
     8  
     9  for PACKAGE in "fs" "irods" "test"
    10  do
    11      PACKAGE_DIR="$SCRIPT_DIR/../$PACKAGE"
    12      gofmt -s -l -d $PACKAGE_DIR | tee /tmp/format_output.txt
    13      test $(cat /tmp/format_output.txt | wc -l) -eq 0
    14  done