23 lines
564 B
Bash
23 lines
564 B
Bash
#!/bin/sh
|
|
FIREFOX_VERSION=$1
|
|
ARCH=x86_64
|
|
|
|
if [ -z "$FIREFOX_VERSION" ]; then
|
|
echo "Usage: $0 <version>"
|
|
exit 2
|
|
fi
|
|
|
|
[ -e firefox-$FIREFOX_VERSION-langpacks.tar.bz2 ] && exit 0
|
|
|
|
rm -rf firefox-$FIREFOX_VERSION
|
|
mkdir firefox-$FIREFOX_VERSION
|
|
cd firefox-$FIREFOX_VERSION
|
|
wget -r -N -l 1 -np -nd -A "*.xpi" \
|
|
https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-$ARCH/xpi/ || exit 1
|
|
rm -f robots.txt
|
|
[ -z "$(ls *.xpi)" ] && exit 1
|
|
tar -cj *.xpi > ../firefox-$FIREFOX_VERSION-langpacks.tar.bz2
|
|
rm -f *.xpi
|
|
cd ..
|
|
rmdir firefox-$FIREFOX_VERSION
|