Created
October 31, 2022 16:30
-
-
Save thingsiplay/a317dbb593a6068612fd08b433ed14cc to your computer and use it in GitHub Desktop.
Download additional Libretro Shaders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# Required non standard packages: | |
# lynx megatools | |
for option in "${@}" | |
do | |
if [[ "${option}" == "-q" ]] | |
then | |
quiet=1 | |
else | |
quiet=0 | |
fi | |
done | |
declare -a urls=( | |
'https://forums.libretro.com/t/sonkun-s-crt-guest-advanced-hd-slot-mask-presets-thread/39091' | |
'https://forums.libretro.com/t/new-crt-shader-from-guest-crt-guest-advanced-updates/25444' | |
) | |
for url in "${urls[@]}" | |
do | |
# mediafire.com by sonkun | |
link=$(lynx -dump -listonly "${url}" \ | |
| grep -oE "https://www.mediafire.com/.+$") | |
file=$(lynx -dump -listonly "${link}" \ | |
| grep -oE "https://download.+.mediafire.com/.+$") | |
if [[ "${quiet}" -eq 1 ]] | |
then | |
curl --silent --remote-name "${file}" | |
else | |
curl --remote-name "${file}" | |
fi | |
# mega.nz by guest | |
# First link is official release, second link is newest version. | |
link_number='2' | |
link=$(lynx -dump -listonly "${url}" \ | |
| grep -oE "https://mega.nz/.+$" \ | |
| sed -n "${link_number}p" \ | |
| sed 's+#+!+g' \ | |
| sed 's+/file/+/#!+g') | |
if [[ "${quiet}" -eq 1 ]] | |
then | |
megatools dl --no-progress "${link}" 2>/dev/null | |
else | |
megatools dl "${link}" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment