maint: add shebang
This commit adds a test called `shebang`, which checks if all shebangs
in scripts use relative paths through `#/usr/bin/env`, rather than
absolute paths, such as `#/bin/bash`.
See 833b10575b
.
This commit is contained in:
parent
59e812bdbe
commit
53bf3492e8
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if git grep -rnI "^#\!/" :/ | grep -v "#\!/usr/bin/env"
|
||||
then
|
||||
echo "Absolute shebangs found, replace them with \"#!/usr/bin/env\""
|
||||
exit 1
|
||||
else
|
||||
echo "Everything seems ok"
|
||||
exit 0
|
||||
fi
|
Loading…
Reference in New Issue