Add CLI argument check in shebang-patcher
This commit is contained in:
parent
d927b1d645
commit
d5c755be58
|
@ -1,3 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "Usage: shebang-patcher <script>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
sed "s/#!\/bin\/bash/#!\/usr\/bin\/env bash/" -i "$1"
|
||||
|
|
Loading…
Reference in New Issue