I love playing Battle for Wesnoth, an Open Source strategy/RPG-game, but I hate having to click every frakking addon and waiting for the program to reset in between every install .. so here's a script that takes care of that.
Note that this was made for BfW1.8 under Ubuntu 11.04:
(Edit : I've removed the unpacking portion of this script as it doesn't seem to work)
- This script requires wget and Battle for Wesnoth 1.8. If you do not have them install them now.
- Open a terminal in the usual way or by pressing ctrl+alt+T
- Create a folder to hold your files by entering "mkdir BfWaddons"
- Enter the dir with "cd BfWaddons"
- Enter "gedit addons_18.txt" to create a textfile and add the URL http://addons.wesnoth.org/1.8/ to it. Save the file and exit.
- Enter "gedit get_addons_18.sh" to create the script-file and enter the following code:
# Primitive bash-script to download and extract all addons for Battle for Wesnoth 1.8
# by email@example.com
# released 2011-10-31 under WTFPL-License v.2 http://sam.zoy.org/wtfpl/COPYING
# Wget recursively downloads only BZ2 files linked from the sites listed
# in addons_18.txt that are newer than any you've already downloaded. There are a few
# other specifications in there - like to not create a new directory for every music
# file, to ignore robots.txt and to not crawl up to the parent directory of a link.
# It is based on this example http://www.veen.com/jeff/archives/000573.html
wget -r -l1 -H -t1 -nd -N -np -A.bz2 -erobots=off -i addons_18.txt
- Save and exit.
- Now enter "./get_addons_18.sh" and wait coz it's gonna take a while.
- Once the download has finished you will have to move the files to the appropriate directory yourself. With BfW it is /home/[USER]/.wesnoth1.8/ and unpack them yourself. I couldn't make the script do that yet.