github.com/lestrrat-go/jwx/v2@v2.0.21/scripts/check-diff.sh (about)

     1  #!/bin/bash
     2  
     3  UNTRACKED=$(git ls-files --others --exclude-standard)
     4  DIFF=$(git diff)
     5  
     6  st=0
     7  if [ ! -z "$DIFF" ]; then
     8      echo "==== START OF DIFF FOUND ==="
     9      echo ""
    10      echo "$DIFF"
    11      echo ""
    12      echo "Above diff was found."
    13      echo ""
    14      echo "==== END OF DIFF FOUND ==="
    15      echo ""
    16      st=1
    17  fi
    18  
    19  if [ ! -z "$UNTRACKED" ]; then
    20      echo "==== START OF UNTRACKED FILES FOUND ==="
    21      echo ""
    22      echo "$UNTRACKED"
    23      echo ""
    24      echo "Above untracked files were found."
    25      echo ""
    26      echo "==== END OF UNTRACKED FILES FOUND ==="
    27      echo ""
    28      st=1
    29  fi
    30  
    31  exit $st