Changed ftp.mozilla.org to archive.mozilla.org (v2.0)

This commit is contained in:
clamsawd 2015-10-06 19:50:14 +02:00
parent 2589c4a58d
commit 9f589b8ccc
2 changed files with 121 additions and 165 deletions

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
# Script to install Firefox on GNU/Linux # Script to install Firefox on GNU/Linux
# Created by Quique (quuiqueee@gmail.com) # Created by clamsawd (clamsawd@openmailbox.org)
# Version 1.0 # Version 2.0
# Licensed by GPL v.2 # Licensed by GPL v.2
# Last update: 05-09-2014 # Last update: 24-08-2015
# -------------------------------------- # --------------------------------------
function printf(){ function printf(){
@ -57,83 +57,48 @@ KERNEL=$(uname -s)
# Install Firefox using 'tar' command and # Install Firefox using 'tar' command and
# initialize the 'create_firefox_icon' function. # initialize the 'create_firefox_icon' function.
function install_firefox_tar(){ function install_firefox(){
printf "" printf ""
printf " <-Downloading Mozilla Firefox->" printf " <-Downloading Mozilla Firefox->"
cd /tmp/ cd /tmp/
$APP_DOWNLOAD $SERVER if [ "$APP_DOWNLOAD" == "curl" ] ; then
printf " <-Installing Mozilla Firefox->" $APP_DOWNLOAD $SERVER > firefox-$VERSION
tar jxvf firefox-$VERSION.tar.bz2 -C /opt/
rm -rf /usr/bin/firefox
ln -s /opt/firefox/firefox /usr/bin/firefox
chmod 755 -R /opt/firefox/
rm -rf /tmp/firefox-$VERSION.tar.bz2
create_firefox_icon
}
# Install Firefox using '7za' command (p7zip) and
# initialize the 'create_firefox_icon' function.
function install_firefox_7za(){
printf ""
printf " <-Downloading Mozilla Firefox->"
cd /tmp/
$APP_DOWNLOAD $SERVER
printf " <-Installing Mozilla Firefox->"
7za x firefox-$VERSION.tar.bz2
7za x firefox-$VERSION.tar -y -o/opt/
rm -rf /usr/bin/firefox
ln -s /opt/firefox/firefox /usr/bin/firefox
chmod 755 -R /opt/firefox/
rm -rf /tmp/firefox-$VERSION.tar.bz2
rm -rf /tmp/firefox-$VERSION.tar
create_firefox_icon
}
# Check if '7za' ('p7zip' package) is installed,
# define the variable 'UNPACK' and initialize the
# 'step5_install_firefox' function.
function check_7za_command_on_system(){
7za --help > /dev/null
if [ "$?" -eq 0 ] ; then
UNPACK=7za
step5_install_firefox
else else
UNPACK=tar $APP_DOWNLOAD $SERVER
step5_install_firefox
fi fi
printf " <-Installing Mozilla Firefox->"
tar jxvf firefox-$VERSION -C /opt/
rm -rf /usr/bin/firefox
ln -s /opt/firefox/firefox /usr/bin/firefox
chmod 755 -R /opt/firefox/
rm -rf /tmp/firefox-$VERSION
create_firefox_icon
} }
# Define the complete URL of selected firefox package, show # Define the complete URL of selected firefox package, show
# the selected previous options to confirm and will initialize # the selected previous options to confirm and will initialize
# the install ('install_firefox_7za' or 'install_firefox_tar' function). # the install ('install_firefox' function).
function step5_install_firefox(){ function step5_install_firefox(){
SERVER=ftp://ftp.mozilla.org/pub/firefox/releases/$VERSION/$ARCH/$LANGUAGE/firefox-$VERSION.tar.bz2 SERVER=http://archive.mozilla.org/pub/firefox/releases/$RELEASE/$ARCH/$LANGUAGE/firefox-$VERSION
clear clear
printf "" printf ""
printf "[Step 5/5] Check your selected installation:" printf "[Step 5/5] Check your selected installation:"
printf "" printf ""
printf "Install: Mozilla Firefox" printf "Install: Mozilla Firefox"
printf "Version: $VERSION" printf "Package: firefox-$VERSION"
printf "Package: firefox-$VERSION.tar.bz2"
printf "Language: $LANGUAGE" printf "Language: $LANGUAGE"
printf "Arch: $ARCH" printf "Arch: $ARCH"
printf "Directory: /opt/firefox/"
printf "" printf ""
printf "Apps: $NAME_APP (download) , $UNPACK (unpack) " printf "Apps: $NAME_APP (download) , tar (unpack) "
printf "" printf ""
printf -n "(default: y) Is correct (y/n/q); " ; read VAREND printf -n "(default: y) Is correct (y/n/q); " ; read VAREND
if [ "${VAREND:-NO_VALUE}" == "NO_VALUE" -o "$VAREND" == "yes" -o "$VAREND" == "y" ] ; then if [ "${VAREND:-NO_VALUE}" == "NO_VALUE" -o "$VAREND" == "yes" -o "$VAREND" == "y" ] ; then
if [ "$UNPACK" == "7za" ]; then install_firefox
install_firefox_7za
else
install_firefox_tar
fi
elif [ "$VAREND" == "no" -o "$VAREND" == "n" ] ; then elif [ "$VAREND" == "no" -o "$VAREND" == "n" ] ; then
get_list_versions get_list_versions
@ -251,7 +216,7 @@ function check_other_installs_on_system(){
} }
# Define the variable 'APP_DOWNLOAD' and # Define the variable 'APP_DOWNLOAD' and
# initialize the 'check_7za_command_on_system' # initialize the 'step5_install_firefox'
# function. # function.
function step4_choose_app_download(){ function step4_choose_app_download(){
@ -264,6 +229,7 @@ function check_other_installs_on_system(){
printf "(1) - wget ($WGET)" printf "(1) - wget ($WGET)"
printf "(2) - aria2c ($ARIA2C)" printf "(2) - aria2c ($ARIA2C)"
printf "(3) - axel ($AXEL)" printf "(3) - axel ($AXEL)"
printf "(4) - curl (Available)"
printf "" printf ""
printf "(q) - quit" printf "(q) - quit"
printf "" printf ""
@ -277,7 +243,7 @@ function check_other_installs_on_system(){
if [ "$WGET" == "Available" ]; then if [ "$WGET" == "Available" ]; then
APP_DOWNLOAD='wget -c' APP_DOWNLOAD='wget -c'
NAME_APP='wget' NAME_APP='wget'
check_7za_command_on_system step5_install_firefox
else else
clear clear
printf "" printf ""
@ -295,7 +261,7 @@ function check_other_installs_on_system(){
if [ "$ARIA2C" == "Available" ]; then if [ "$ARIA2C" == "Available" ]; then
APP_DOWNLOAD='aria2c --check-certificate=false' APP_DOWNLOAD='aria2c --check-certificate=false'
NAME_APP='aria2c' NAME_APP='aria2c'
check_7za_command_on_system step5_install_firefox
else else
clear clear
printf "" printf ""
@ -313,7 +279,7 @@ function check_other_installs_on_system(){
if [ "$AXEL" == "Available" ]; then if [ "$AXEL" == "Available" ]; then
APP_DOWNLOAD='axel' APP_DOWNLOAD='axel'
NAME_APP='axel' NAME_APP='axel'
check_7za_command_on_system step5_install_firefox
else else
clear clear
printf "" printf ""
@ -324,6 +290,12 @@ function check_other_installs_on_system(){
step4_choose_app_download step4_choose_app_download
fi fi
elif [ "$APP" == "4" -o "$APP" == "curl" ] ; then
APP_DOWNLOAD='curl'
NAME_APP='curl'
step5_install_firefox
elif [ "$APP" == "q" -o "$APP" == "quit" ] ; then elif [ "$APP" == "q" -o "$APP" == "quit" ] ; then
exit exit
@ -331,7 +303,7 @@ function check_other_installs_on_system(){
if [ "$WGET" == "Available" ]; then if [ "$WGET" == "Available" ]; then
APP_DOWNLOAD='wget -c' APP_DOWNLOAD='wget -c'
NAME_APP='wget' NAME_APP='wget'
check_7za_command_on_system step5_install_firefox
else else
clear clear
printf "" printf ""
@ -475,8 +447,7 @@ function check_other_installs_on_system(){
} }
# Get the list of available firefox versions using 'curl', # Get the list of available firefox versions using 'curl',
# define the variable 'VER' and initialize the 'step2_choose_language' # and initialize the 'step2_choose_language' function.
# function.
function get_list_versions() { function get_list_versions() {
@ -484,9 +455,13 @@ function check_other_installs_on_system(){
printf "" printf ""
printf "Getting information of available versions, please wait.." printf "Getting information of available versions, please wait.."
printf "" printf ""
TMP_FILE=/tmp/moz_versions TMP_FILE_STABLE=/tmp/moz_versions_st
FTP_FIREFOX=ftp://ftp.mozilla.org/pub/firefox/releases TMP_FILE_BETA=/tmp/moz_versions_bt
curl $FTP_FIREFOX/ > $TMP_FILE TMP_FILE_ESR=/tmp/moz_versions_esr
HTTP_FIREFOX=http://archive.mozilla.org/pub/firefox/releases
curl "$HTTP_FIREFOX/latest/linux-x86_64/en-US/" | grep "tar.bz2" | cut -d "-" -f 3 | cut -d "<" -f 1 > $TMP_FILE_STABLE
curl "$HTTP_FIREFOX/latest-beta/linux-x86_64/en-US/" | grep "tar.bz2" | cut -d "-" -f 3 | cut -d "<" -f 1 > $TMP_FILE_BETA
curl "$HTTP_FIREFOX/latest-esr/linux-x86_64/en-US/" | grep "tar.bz2" | cut -d "-" -f 3 | cut -d "<" -f 1 > $TMP_FILE_ESR
error=$? error=$?
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
printf "OK" > /dev/null printf "OK" > /dev/null
@ -503,11 +478,10 @@ function check_other_installs_on_system(){
function step1_choose_version(){ function step1_choose_version(){
FTP_VERSIONS=`cat $TMP_FILE | grep "latest" | cut -d ">" -f 2 | cut -d " " -f 2` FIREFOX_STABLE=`cat $TMP_FILE_STABLE`
FIREFOX_STABLE=`echo $FTP_VERSIONS | cut -d " " -f 1` FIREFOX_BETA=`cat $TMP_FILE_BETA`
FIREFOX_BETA=`cat $TMP_FILE | grep "latest-beta" | cut -d ">" -f 2 | cut -d " " -f 2` FIREFOX_ESR=`cat $TMP_FILE_ESR`
FIREFOX_ESR=`cat $TMP_FILE | grep "latest-esr" | cut -d ">" -f 2 | cut -d " " -f 2` DEFAULT=`cat $TMP_FILE_STABLE`
DEFAULT=`echo $FTP_VERSIONS | cut -d " " -f 1`
clear clear
printf "" printf ""
@ -515,28 +489,32 @@ function check_other_installs_on_system(){
printf "" printf ""
printf "Available Versions:" printf "Available Versions:"
printf "" printf ""
printf "(1) - $FIREFOX_ESR (ESR)" printf "(1) - firefox-$FIREFOX_ESR (ESR)"
printf "(2) - $FIREFOX_STABLE (stable)" printf "(2) - firefox-$FIREFOX_STABLE (stable)"
printf "(3) - $FIREFOX_BETA (beta)" printf "(3) - firefox-$FIREFOX_BETA (beta)"
printf "" printf ""
printf "(q) - quit" printf "(q) - quit"
printf "" printf ""
printf -n "(Default: $DEFAULT) Choose an option; " ; read VER printf -n "(Default: firefox-$DEFAULT) Choose an option; " ; read VER
if [ "$VER" == "1" -o "$VER" == "ESR" ] ; then if [ "$VER" == "1" -o "$VER" == "ESR" ] ; then
VERSION=$FIREFOX_ESR VERSION=$FIREFOX_ESR
RELEASE="latest-esr"
step2_choose_language step2_choose_language
elif [ "$VER" == "2" -o "$VER" == "stable" ] ; then elif [ "$VER" == "2" -o "$VER" == "stable" ] ; then
VERSION=$FIREFOX_STABLE VERSION=$FIREFOX_STABLE
RELEASE="latest"
step2_choose_language step2_choose_language
elif [ "$VER" == "3" -o "$VER" == "beta" ] ; then elif [ "$VER" == "3" -o "$VER" == "beta" ] ; then
VERSION=$FIREFOX_BETA VERSION=$FIREFOX_BETA
RELEASE="latest-beta"
step2_choose_language step2_choose_language
elif [ "${VER:-NO_VALUE}" == "NO_VALUE" ] ; then elif [ "${VER:-NO_VALUE}" == "NO_VALUE" ] ; then
VERSION=$DEFAULT VERSION=$DEFAULT
RELEASE="latest"
step2_choose_language step2_choose_language
elif [ "$VER" == "q" -o "$VER" == "quit" ] ; then elif [ "$VER" == "q" -o "$VER" == "quit" ] ; then

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
# Script to install Thunderbird on GNU/Linux # Script to install Thunderbird on GNU/Linux
# Created by Quique (quuiqueee@gmail.com) # Created by clamsawd (clamsawd@openmailbox.org)
# Version 1.0 # Version 2.0
# Licensed by GPL v.2 # Licensed by GPL v.2
# Last update: 05-09-2014 # Last update: 24-08-2015
# -------------------------------------- # --------------------------------------
function printf(){ function printf(){
@ -33,15 +33,15 @@ KERNEL=$(uname -s)
exit 0 exit 0
fi fi
# Create Mozilla Thunderbird shortcut after of install it. # Create Mozilla thunderbird shortcut after of install it.
function create_thunderbird_icon(){ function create_thunderbird_icon(){
textprint "[Desktop Entry]" > /usr/share/applications/thunderbird.desktop textprint "[Desktop Entry]" > /usr/share/applications/thunderbird.desktop
#textprint "Encoding=UTF-8" >> /usr/share/applications/thunderbird.desktop #textprint "Encoding=UTF-8" >> /usr/share/applications/thunderbird.desktop
textprint "Name=Mozilla Thunderbird" >> /usr/share/applications/thunderbird.desktop textprint "Name=Mozilla Thunderbird" >> /usr/share/applications/thunderbird.desktop
textprint "Comment=Mozilla Email Reader" >> /usr/share/applications/thunderbird.desktop textprint "Comment=Mozilla Email Reader" >> /usr/share/applications/thunderbird.desktop
textprint "GenericName=Email Reader" >> /usr/share/applications/thunderbird.desktop textprint "GenericName=Web Browser" >> /usr/share/applications/thunderbird.desktop
textprint "X-GNOME-FullName=Mozilla Thunderbird" >> /usr/share/applications/thunderbird.desktop textprint "X-GNOME-FullName=Mozilla thunderbird" >> /usr/share/applications/thunderbird.desktop
textprint "Exec=thunderbird %u" >> /usr/share/applications/thunderbird.desktop textprint "Exec=thunderbird %u" >> /usr/share/applications/thunderbird.desktop
textprint "Terminal=false" >> /usr/share/applications/thunderbird.desktop textprint "Terminal=false" >> /usr/share/applications/thunderbird.desktop
textprint "X-MultipleArgs=false" >> /usr/share/applications/thunderbird.desktop textprint "X-MultipleArgs=false" >> /usr/share/applications/thunderbird.desktop
@ -56,84 +56,49 @@ KERNEL=$(uname -s)
} }
# Install thunderbird using 'tar' command and # Install thunderbird using 'tar' command and
# initialize the 'create_thunderbird_icon' function. # initialize the 'create_THUNDERBIRD_icon' function.
function install_thunderbird_tar(){ function install_thunderbird(){
printf "" printf ""
printf " <-Downloading Mozilla Thunderbird->" printf " <-Downloading Mozilla Thunderbird->"
cd /tmp/ cd /tmp/
$APP_DOWNLOAD $SERVER if [ "$APP_DOWNLOAD" == "curl" ] ; then
printf " <-Installing Mozilla Thunderbird->" $APP_DOWNLOAD $SERVER > thunderbird-$VERSION
tar jxvf thunderbird-$VERSION.tar.bz2 -C /opt/
rm -rf /usr/bin/thunderbird
ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird
chmod 755 -R /opt/thunderbird/
rm -rf /tmp/thunderbird-$VERSION.tar.bz2
create_thunderbird_icon
}
# Install thunderbird using '7za' command (p7zip) and
# initialize the 'create_thunderbird_icon' function.
function install_thunderbird_7za(){
printf ""
printf " <-Downloading Mozilla Thunderbird->"
cd /tmp/
$APP_DOWNLOAD $SERVER
printf " <-Installing Mozilla Thunderbird->"
7za x thunderbird-$VERSION.tar.bz2
7za x thunderbird-$VERSION.tar -y -o/opt/
rm -rf /usr/bin/thunderbird
ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird
chmod 755 -R /opt/thunderbird/
rm -rf /tmp/thunderbird-$VERSION.tar.bz2
rm -rf /tmp/thunderbird-$VERSION.tar
create_thunderbird_icon
}
# Check if '7za' ('p7zip' package) is installed,
# define the variable 'UNPACK' and initialize the
# 'step5_install_thunderbird' function.
function check_7za_command_on_system(){
7za --help > /dev/null
if [ "$?" -eq 0 ] ; then
UNPACK=7za
step5_install_thunderbird
else else
UNPACK=tar $APP_DOWNLOAD $SERVER
step5_install_thunderbird
fi fi
printf " <-Installing Mozilla Thunderbird->"
tar jxvf thunderbird-$VERSION -C /opt/
rm -rf /usr/bin/thunderbird
ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird
chmod 755 -R /opt/thunderbird/
rm -rf /tmp/thunderbird-$VERSION
create_thunderbird_icon
} }
# Define the complete URL of selected thunderbird package, show # Define the complete URL of selected thunderbird package, show
# the selected previous options to confirm and will initialize # the selected previous options to confirm and will initialize
# the install ('install_thunderbird_7za' or 'install_thunderbird_tar' function). # the install ('install_thunderbird' function).
function step5_install_thunderbird(){ function step5_install_thunderbird(){
SERVER=ftp://ftp.mozilla.org/pub/thunderbird/releases/$VERSION/$ARCH/$LANGUAGE/thunderbird-$VERSION.tar.bz2 SERVER=http://archive.mozilla.org/pub/thunderbird/releases/$RELEASE/$ARCH/$LANGUAGE/thunderbird-$VERSION
clear clear
printf "" printf ""
printf "[Step 5/5] Check your selected installation:" printf "[Step 5/5] Check your selected installation:"
printf "" printf ""
printf "Install: Mozilla Thunderbird" printf "Install: Mozilla Thunderbird"
printf "Version: $VERSION" printf "Package: thunderbird-$VERSION"
printf "Package: thunderbird-$VERSION.tar.bz2"
printf "Language: $LANGUAGE" printf "Language: $LANGUAGE"
printf "Arch: $ARCH" printf "Arch: $ARCH"
printf "Directory: /opt/thunderbird/"
printf "" printf ""
printf "Apps: $NAME_APP (download) , $UNPACK (unpack) " printf "Apps: $NAME_APP (download) , tar (unpack) "
printf "" printf ""
printf -n "(default: y) Is correct (y/n/q); " ; read VAREND printf -n "(default: y) Is correct (y/n/q); " ; read VAREND
if [ "${VAREND:-NO_VALUE}" == "NO_VALUE" -o "$VAREND" == "yes" -o "$VAREND" == "y" ] ; then if [ "${VAREND:-NO_VALUE}" == "NO_VALUE" -o "$VAREND" == "yes" -o "$VAREND" == "y" ] ; then
if [ "$UNPACK" == "7za" ]; then install_thunderbird
install_thunderbird_7za
else
install_thunderbird_tar
fi
elif [ "$VAREND" == "no" -o "$VAREND" == "n" ] ; then elif [ "$VAREND" == "no" -o "$VAREND" == "n" ] ; then
get_list_versions get_list_versions
@ -187,7 +152,7 @@ function check_other_installs_on_system(){
if [ -d /opt/thunderbird/ ]; then if [ -d /opt/thunderbird/ ]; then
clear clear
printf "" printf ""
printf "Detected a previous installation of thunderbird" printf "Detected a previous installation of Thunderbird"
printf "Do you want to overwrite or uninstall the current version?" printf "Do you want to overwrite or uninstall the current version?"
printf "" printf ""
printf "(1) - overwrite" printf "(1) - overwrite"
@ -233,7 +198,7 @@ function check_other_installs_on_system(){
fi fi
} }
# Check if 'curl' is installed and cancel the installation # Check if 'git' is installed and cancel the installation
# if it is not installed. Initialize the 'check_other_installs_on_system' # if it is not installed. Initialize the 'check_other_installs_on_system'
# too. # too.
function check_curl_on_system(){ function check_curl_on_system(){
@ -251,7 +216,7 @@ function check_other_installs_on_system(){
} }
# Define the variable 'APP_DOWNLOAD' and # Define the variable 'APP_DOWNLOAD' and
# initialize the 'check_7za_command_on_system' # initialize the 'step5_install_thunderbird'
# function. # function.
function step4_choose_app_download(){ function step4_choose_app_download(){
@ -264,6 +229,7 @@ function check_other_installs_on_system(){
printf "(1) - wget ($WGET)" printf "(1) - wget ($WGET)"
printf "(2) - aria2c ($ARIA2C)" printf "(2) - aria2c ($ARIA2C)"
printf "(3) - axel ($AXEL)" printf "(3) - axel ($AXEL)"
printf "(4) - curl (Available)"
printf "" printf ""
printf "(q) - quit" printf "(q) - quit"
printf "" printf ""
@ -277,7 +243,7 @@ function check_other_installs_on_system(){
if [ "$WGET" == "Available" ]; then if [ "$WGET" == "Available" ]; then
APP_DOWNLOAD='wget -c' APP_DOWNLOAD='wget -c'
NAME_APP='wget' NAME_APP='wget'
check_7za_command_on_system step5_install_thunderbird
else else
clear clear
printf "" printf ""
@ -295,7 +261,7 @@ function check_other_installs_on_system(){
if [ "$ARIA2C" == "Available" ]; then if [ "$ARIA2C" == "Available" ]; then
APP_DOWNLOAD='aria2c --check-certificate=false' APP_DOWNLOAD='aria2c --check-certificate=false'
NAME_APP='aria2c' NAME_APP='aria2c'
check_7za_command_on_system step5_install_thunderbird
else else
clear clear
printf "" printf ""
@ -313,7 +279,7 @@ function check_other_installs_on_system(){
if [ "$AXEL" == "Available" ]; then if [ "$AXEL" == "Available" ]; then
APP_DOWNLOAD='axel' APP_DOWNLOAD='axel'
NAME_APP='axel' NAME_APP='axel'
check_7za_command_on_system step5_install_thunderbird
else else
clear clear
printf "" printf ""
@ -324,6 +290,12 @@ function check_other_installs_on_system(){
step4_choose_app_download step4_choose_app_download
fi fi
elif [ "$APP" == "4" -o "$APP" == "curl" ] ; then
APP_DOWNLOAD='curl'
NAME_APP='curl'
step5_install_thunderbird
elif [ "$APP" == "q" -o "$APP" == "quit" ] ; then elif [ "$APP" == "q" -o "$APP" == "quit" ] ; then
exit exit
@ -331,7 +303,7 @@ function check_other_installs_on_system(){
if [ "$WGET" == "Available" ]; then if [ "$WGET" == "Available" ]; then
APP_DOWNLOAD='wget -c' APP_DOWNLOAD='wget -c'
NAME_APP='wget' NAME_APP='wget'
check_7za_command_on_system step5_install_thunderbird
else else
clear clear
printf "" printf ""
@ -475,8 +447,7 @@ function check_other_installs_on_system(){
} }
# Get the list of available thunderbird versions using 'curl', # Get the list of available thunderbird versions using 'curl',
# define the variable 'VER' and initialize the 'step2_choose_language' # and initialize the 'step2_choose_language' function.
# function.
function get_list_versions() { function get_list_versions() {
@ -484,9 +455,13 @@ function check_other_installs_on_system(){
printf "" printf ""
printf "Getting information of available versions, please wait.." printf "Getting information of available versions, please wait.."
printf "" printf ""
TMP_FILE=/tmp/moz_versions TMP_FILE_STABLE=/tmp/moz_versions_st
FTP_THUNDERBIRD=ftp://ftp.mozilla.org/pub/thunderbird/releases TMP_FILE_BETA=/tmp/moz_versions_bt
curl $FTP_THUNDERBIRD/ > $TMP_FILE TMP_FILE_ESR=/tmp/moz_versions_esr
HTTP_THUNDERBIRD=http://archive.mozilla.org/pub/thunderbird/releases
curl "$HTTP_THUNDERBIRD/latest/linux-x86_64/en-US/" | grep "tar.bz2" | cut -d "-" -f 3 | cut -d "<" -f 1 > $TMP_FILE_STABLE
curl "$HTTP_THUNDERBIRD/latest-beta/linux-x86_64/en-US/" | grep "tar.bz2" | cut -d "-" -f 3 | cut -d "<" -f 1 > $TMP_FILE_BETA
curl "$HTTP_THUNDERBIRD/latest-esr/linux-x86_64/en-US/" | grep "tar.bz2" | cut -d "-" -f 3 | cut -d "<" -f 1 > $TMP_FILE_ESR
error=$? error=$?
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
printf "OK" > /dev/null printf "OK" > /dev/null
@ -503,11 +478,10 @@ function check_other_installs_on_system(){
function step1_choose_version(){ function step1_choose_version(){
FTP_VERSIONS=`cat $TMP_FILE | grep "latest" | cut -d ">" -f 2 | cut -d " " -f 2` THUNDERBIRD_STABLE=`cat $TMP_FILE_STABLE`
THUNDERBIRD_STABLE=`echo $FTP_VERSIONS | cut -d " " -f 1` THUNDERBIRD_BETA=`cat $TMP_FILE_BETA`
THUNDERBIRD_BETA=`cat $TMP_FILE | grep "latest-beta" | cut -d ">" -f 2 | cut -d " " -f 2` THUNDERBIRD_ESR=`cat $TMP_FILE_ESR`
THUNDERBIRD_ESR=`cat $TMP_FILE | grep "latest-esr" | cut -d ">" -f 2 | cut -d " " -f 2` DEFAULT=`cat $TMP_FILE_STABLE`
DEFAULT=`echo $FTP_VERSIONS | cut -d " " -f 1`
clear clear
printf "" printf ""
@ -515,28 +489,32 @@ function check_other_installs_on_system(){
printf "" printf ""
printf "Available Versions:" printf "Available Versions:"
printf "" printf ""
printf "(1) - $THUNDERBIRD_ESR (ESR)" printf "(1) - thunderbird-$THUNDERBIRD_ESR (ESR)"
printf "(2) - $THUNDERBIRD_STABLE (stable)" printf "(2) - thunderbird-$THUNDERBIRD_STABLE (stable)"
printf "(3) - $THUNDERBIRD_BETA (beta)" printf "(3) - thunderbird-$THUNDERBIRD_BETA (beta)"
printf "" printf ""
printf "(q) - quit" printf "(q) - quit"
printf "" printf ""
printf -n "(Default: $DEFAULT) Choose an option; " ; read VER printf -n "(Default: thunderbird-$DEFAULT) Choose an option; " ; read VER
if [ "$VER" == "1" -o "$VER" == "ESR" ] ; then if [ "$VER" == "1" -o "$VER" == "ESR" ] ; then
VERSION=$THUNDERBIRD_ESR VERSION=$THUNDERBIRD_ESR
RELEASE="latest-esr"
step2_choose_language step2_choose_language
elif [ "$VER" == "2" -o "$VER" == "stable" ] ; then elif [ "$VER" == "2" -o "$VER" == "stable" ] ; then
VERSION=$THUNDERBIRD_STABLE VERSION=$THUNDERBIRD_STABLE
RELEASE="latest"
step2_choose_language step2_choose_language
elif [ "$VER" == "3" -o "$VER" == "beta" ] ; then elif [ "$VER" == "3" -o "$VER" == "beta" ] ; then
VERSION=$THUNDERBIRD_BETA VERSION=$THUNDERBIRD_BETA
RELEASE="latest-beta"
step2_choose_language step2_choose_language
elif [ "${VER:-NO_VALUE}" == "NO_VALUE" ] ; then elif [ "${VER:-NO_VALUE}" == "NO_VALUE" ] ; then
VERSION=$DEFAULT VERSION=$DEFAULT
RELEASE="latest"
step2_choose_language step2_choose_language
elif [ "$VER" == "q" -o "$VER" == "quit" ] ; then elif [ "$VER" == "q" -o "$VER" == "quit" ] ; then