Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo -n "Ładowanie listy modeli z forum ... "
- modellist=`curl --silent "http://colobot.info/forum/viewtopic.php?f=15&t=610" | grep -o "<a class=\"postlink\" href=\"https://www.dropbox.com/s/[A-Za-z0-9.]*/[A-Za-z0-9.]*\">"`
- echo "ok"
- while read -r line; do
- [[ $line =~ \"https://www.dropbox.com/s/(.*)/(.*)\" ]]
- model=${BASH_REMATCH[2]}
- url="https://www.dropbox.com/s/${BASH_REMATCH[1]}/${BASH_REMATCH[2]}"
- echo -n "Pobieranie $model ... "
- curl -L --silent $url > ./data/models-new/$model
- echo "ok"
- done <<< "$modellist"
- echo -n "Instalowanie nowych modeli ... "
- chmod -R 0644 ./data/models-new/*
- sudo rm -r /usr/local/share/games/colobot/models-new
- sudo cp -r ./data/models-new /usr/local/share/games/colobot/models-new
- echo "ok"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement