Files
documentation-fixes/fetch.sh
2011-02-17 21:21:35 +00:00

21 lines
313 B
Bash
Executable File

#!/bin/sh
if [ $# != 1 ]
then
echo "Usage: fetch.sh url"
exit 0
fi
path=$(echo $1 | sed -n -E "s/https?:\/\/(www)?\.boost\.org\/doc\/libs\///p")
if [ x$path = x ]
then
echo "Not a boost documentation URL: $1"
exit 0
fi
cd $(dirname $0)
mkdir -p $(dirname $path)
cd $(dirname $path)
curl -O $1