2020-05-14 21:44:14 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-05-15 20:56:33 +02:00
|
|
|
# Autistic script for convert GitHub links to files and download it via wget.
|
2020-05-14 21:44:14 +02:00
|
|
|
|
|
|
|
echo "$1" | sed '
|
2020-05-15 20:56:33 +02:00
|
|
|
s/github.com/raw.githubusercontent.com/g;
|
2020-05-14 21:44:14 +02:00
|
|
|
s/blob//g
|
|
|
|
' | xargs -r wget
|
2020-05-14 21:59:54 +02:00
|
|
|
|
|
|
|
filename="$(echo "$1" | sed 's/.*\///g')"
|
|
|
|
|
|
|
|
[ "$(sed 's/#\!\/.*/bang/g; 1q' "$filename")" = "bang" ] && chmod +x "$filename"
|