Files
sunnypilot/scripts/lint/check_shebang_format.sh
T
github-actions[bot] 13aee3754b sunnypilot v2026.002.000 release
date: 2026-07-20T11:52:50
master commit: bae7e49626
2026-07-20 11:53:51 +00:00

16 lines
320 B
Bash
Executable File

#!/usr/bin/env bash
FAIL=0
if grep '^#!.*python' $@ | grep -v '#!/usr/bin/env python3$'; then
echo -e "Invalid shebang! Must use '#!/usr/bin/env python3'\n"
FAIL=1
fi
if grep '^#!.*bash' $@ | grep -v '#!/usr/bin/env bash$'; then
echo -e "Invalid shebang! Must use '#!/usr/bin/env bash'"
FAIL=1
fi
exit $FAIL