Skip to content

Instantly share code, notes, and snippets.

@hugopeixoto
Created October 28, 2014 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugopeixoto/840767fd056722efb70d to your computer and use it in GitHub Desktop.
Save hugopeixoto/840767fd056722efb70d to your computer and use it in GitHub Desktop.
#!/bin/bash
curl --silent http://www.debian.org/international/l10n/po-debconf/pt |
grep 'href="http://i18n.debian.org/material/po/.*.po.gz">pt.po</a>' |
sed -e 's/.*name="\([^"]*\)".*href="\([^"]*\)".*/\1 \2/' |
while read line
do
a=( $line )
name="${a[0]}"
url="${a[1]}"
mkdir -p "$name"
echo "$name" "$url"
curl --silent "$url" | gunzip -c > "$name/pt.po"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment