1#!/bin/sh -e 2[ "$#" -ne 2 ] && echo "Please provide <shellcheckBinary> <inputPath>" && exit 1; 3 4SHELLCHECK="$1" 5if [ ! -x "$SHELLCHECK" ]; then 6 exit 0 7fi 8 9INPUT="$2" 10INPUT_EXT="${INPUT##*.}" 11 12if [ "${INPUT_EXT}" = "sh" ]; then 13 ${SHELLCHECK} "$2" 14else 15 exit 0 16fi 17 18 19