21 lines
518 B
Bash
21 lines
518 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/
|
|
rm -f robots.txt
|
|
tar -cj *.xpi > ../firefox-$FIREFOX_VERSION-langpacks.tar.bz2
|
|
rm -f *.xpi
|
|
cd ..
|
|
rmdir firefox-$FIREFOX_VERSION
|