mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 15:10:53 +00:00
e6f2cd0b2a
$ git grep ' $' | grep -v ^test/ | cut -d : -f 1 | sort -u > /tmp/trailing $ for a in `cat /tmp/trailing` ; do sed -i -e 's/ *$//' $a ; done
21 lines
338 B
Bash
Executable File
21 lines
338 B
Bash
Executable File
#!/bin/sh
|
|
|
|
checkshellscript() {
|
|
filelist="$1"
|
|
checkfun="$2"
|
|
|
|
printf '%s\n' "$filelist" | while IFS= read -r file
|
|
do
|
|
$checkfun "$file"
|
|
done
|
|
}
|
|
|
|
if [ -f "$1" ]; then
|
|
SCRIPTS="$1"
|
|
else
|
|
SCRIPTS=$(git grep '^#!/bin/sh' | cut -d: -f1)
|
|
fi
|
|
|
|
checkshellscript "$SCRIPTS" "shellcheck --format=gcc"
|
|
checkshellscript "$SCRIPTS" checkbashisms
|