rizin/sys/shellcheck.sh
kij f3d2edea56 WIP: Remove hardcoded list of scripts (#11228)
* remove hardcoded list of scripts
disabled shellcheck xml format

* removed GNU find dependency

* removed unused code
removed file caching
2018-08-31 15:54:25 +02:00

19 lines
404 B
Bash
Executable file

#!/bin/sh
checkshellscript() {
filelist="$1"
checkfun="$2"
while read -r file
do
$checkfun "$file"
done < "$filelist"
}
echo "Find all shellscripts, caching $SCRIPTS"
SCRIPTS=$(find . \! -path '/.git' -print0 | xargs -0 file | grep "POSIX shell script" | cut -d: -f1)
checkshellscript "./sys/scripts.list" "shellcheck --format=gcc"
checkshellscript "./sys/scripts.list" "checkbashisms"