14 lines
328 B
Plaintext
Raw Normal View History

2020-05-14 21:44:14 +02:00
#!/bin/sh
# Autistic script for convert GitHub links into
# links to raw files and download it via wget.
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"