Notes/src/Shell/Retriev GBA Roms/gba-rom-dlr.sh

20 lines
518 B
Bash
Raw Normal View History

2021-02-21 01:25:30 +00:00
#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd)
2021-02-21 02:33:40 +00:00
cat page.lst| while read line; do
wget "$(wget "$line" -O- -q|grep ".zip"|grep "product_download_url"|sed 's/http/\nhttp/g'|grep "download.f"|cut -d\" -f1)";
done
2021-02-21 01:25:30 +00:00
}
main $@;