Created
April 17, 2014 13:23
-
-
Save dirkk/10983081 to your computer and use it in GitHub Desktop.
Download all distributions of the latest BaseX snapshot
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/bash | |
PA=$HOME/BaseX/latest | |
URL="http://files.basex.org/releases/latest/" | |
rm -rf $PA | |
mkdir $PA | |
# Get all file paths | |
FILES=`basex -q "distinct-values(http:send-request(<http:request method='get' href='$URL'/>)//div[@id='files']//table/tr/td/a/@href[starts-with(., 'BaseX')]/string())"` | |
for FILE in $FILES | |
do | |
wget -O $PA/$FILE $URL$FILE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment