Changes in 'gethub' script

Automatic made file executable when it have shebang.
This commit is contained in:
samedami 2020-05-14 21:59:54 +02:00
parent 2a4ebb37f9
commit e104b84733
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894

View File

@ -7,3 +7,7 @@ echo "$1" | sed '
s/github.com/raw.githubusercontent.com/g;
s/blob//g
' | xargs -r wget
filename="$(echo "$1" | sed 's/.*\///g')"
[ "$(sed 's/#\!\/.*/bang/g; 1q' "$filename")" = "bang" ] && chmod +x "$filename"