1#!/bin/sh 2 3WINSCOPE_SRC_PATTERN="tools/winscope/" 4 5match=false 6for file in "$@" 7do 8 if echo $file | grep --quiet "$WINSCOPE_SRC_PATTERN" 9 then 10 match=true 11 fi 12done 13 14# If there are changes to winscope files and npm is installed 15if $match && (which node > /dev/null) 16then 17 echo "Running winscope presubmit tests..." 18 npm run test:presubmit --prefix $WINSCOPE_SRC_PATTERN 19fi 20