|
@@ -1,15 +1,11 @@
|
|
|
#!/bin/sh
|
|
|
set -e -x
|
|
|
|
|
|
-if [ -n "$PLUGIN_IGNORE" -a \( -n "$PLUGIN_POSITIVE" -o -n "$PLUGIN_NEGATIVE" \) ]; then
|
|
|
- set "$PLUGIN_IGNORE" "$PLUGIN_POSITIVE" "$PLUGIN_NEGATIVE"
|
|
|
-fi
|
|
|
-
|
|
|
PATHS="`IFS='
|
|
|
' paste -s -d:`"
|
|
|
|
|
|
-if [ -z "$PATHS" ] || [ -z "`node --eval "console.log(require('ignore')().add(process.argv[1].split(',')).filter(process.argv[2].split(':')).join())" "$1" "$PATHS"`" ]; then
|
|
|
- if [ -n "$3" ]; then touch "$3"; fi
|
|
|
-else
|
|
|
+if [ -n "$PATHS" ] && node --eval "process.exit(require('ignore')().add(process.argv[1].split(',')).filter(process.argv[2].split(':')).length ? 0 : 1)" "$1" "$PATHS"; then
|
|
|
if [ -n "$2" ]; then touch "$2"; fi
|
|
|
+else
|
|
|
+ if [ -n "$3" ]; then touch "$3"; fi
|
|
|
fi
|