check-some-are-unignored.sh 465 B

123456789101112131415
  1. #!/bin/sh
  2. set -e -x
  3. if [ -n "$PLUGIN_IGNORE" -a \( -n "$PLUGIN_POSITIVE" -o -n "$PLUGIN_NEGATIVE" \) ]; then
  4. set "$PLUGIN_IGNORE" "$PLUGIN_POSITIVE" "$PLUGIN_NEGATIVE"
  5. fi
  6. PATHS="`IFS='
  7. ' paste -s -d:`"
  8. if [ -z "$PATHS" ] || [ -z "`node --eval "console.log(require('ignore')().add(process.argv[1].split(',')).filter(process.argv[2].split(':')).join())" "$1" "$PATHS"`" ]; then
  9. if [ -n "$3" ]; then touch "$3"; fi
  10. else
  11. if [ -n "$2" ]; then touch "$2"; fi
  12. fi