Početak›Forumi›Linuks distribucije›Mandriva›Softver›Shell script za dnevno azuriranje Firefox-a
- This topic has 1 odgovor, 1 glas, and was last updated 19 years, 8 months ranije by oko.
-
AutorČlanci
-
12. jul 2004. u 9:41 pm #3965okoUčesnik
Na Forumu Mandrakecluba pojavio se script koji relativno brzo skida uvek najnoviju verziju Firefox-a direktno sa Mozilla.org. Ne samo da skida nego odmah i instalira vodeci racuna o brisanju ranijih fajlova. Script treba iz nekog tekst editora samo preneti (paste) u shell sa ovlascenjem root. Sve ostalo radi sam.
echo -e “\033[33mFirefox Nightly Update Script v>.<\033[0m" echo -e "\033[33mBy Matthew Young\033[0m" echo -e "\033[33mReleased under the GNU GPL v2\033[0m" if test ! -O /root then echo -e "\033[33mScript must be ran by root\033[0m";exit fi cd /tmp rm -f /tmp/firefox-i686-linux-gtk2+xft.tar.gz rm -f /tmp/wget-log echo -e "\033[33mDownloading Mozilla Firefox with WGet.Please wait....\033[0m" wget http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-0.9/firefox-i686-linux-gtk2+xft.tar.gz
if test ! -f /tmp/firefox-i686-linux-gtk2+xft.tar.gz
then echo -e "\033[33mDownload Failed\033[0m";exit
fi
echo -e "\033[33mExtracting Firefox.Please Wait...\033[0m"
tar -xzf /tmp/firefox-i686-linux-gtk2+xft.tar.gz
if test ! -d /tmp/firefox
then echo -e "\033[33mExtracting Failed\033[0m";exit
fi
echo -e "\033[33mMaking backup\033[0m"
if test ! -d /opt/firefoxbackups
then mkdir /opt/firefoxbackups
fi
if test -d /opt/firefox
then mv /opt/firefox /opt/firefoxbackups/$(date +%m%d%Y-%R)
fi
echo -e "\033[33mInstalling Firefox in /opt\033[0m"
mv /tmp/firefox /opt
echo -e "\033[33mSetting Permissions.\033[0m"
chown -R root:root /opt/firefox
chmod -R a+r /opt/firefox
echo -e "\033[33mCleaning up download files.\033[0m"
rm -f /tmp/firefox-i686-linux-gtk2+xft.tar.gz
rm -f /tmp/wget-log
echo -e "\033[33mFirefox Update Complete.\033[0m" [/quote]17. jul 2004. u 3:06 pm #20296okoUčesnikScript je u medjuvremenu doteran i skida i Thunderbird. Prilazem ga. Ne zaboravite da se ovaj Firefox pokrece sa komandom u shell-u : firefox-nightly, a THDB sa thunderbird-nightly. Stare rpm verzije ostaju paralelno, ali mozete da ih deinstalirate da vam ne zuzimaju prostor
/echo -e “33[33mFirefox Nightly Update Script v0.933[0m”
echo -e “33[33mBy Matthew Young33[0m”
echo -e “33[33mReleased under the GNU GPL v233[0m”
if test ! -O /root
then echo -e “33[33mScript must be ran by root33[0m”;exit;fi
cd /tmp
rm -f /tmp/firefox-i686-linux-gtk2+xft.tar.gz
rm -f /tmp/wget-log
echo -e “33[33mDownloading Mozilla Firefox with WGet.Please wait….33[0m”
wget http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-0.9/firefox-i686-linux-gtk2+xft.tar.gz
if test ! -f /tmp/firefox-i686-linux-gtk2+xft.tar.gz
then echo -e “33[33mDownload Failed33[0m”;exit;fi
echo -e “33[33mExtracting Firefox.Please Wait…33[0m”
tar -xzf /tmp/firefox-i686-linux-gtk2+xft.tar.gz
if test ! -d /tmp/firefox
then echo -e “33[33mExtracting Failed33[0m”;exit;fi
echo -e “33[33mMaking backup33[0m”
rm -dfr /opt/firefox.old
if test -d /opt/firefox
then mv -f /opt/firefox /opt/firefox.old;fi
echo -e “33[33mInstalling Firefox in /opt33[0m”
mv /tmp/firefox /opt
echo -e “33[33mSetting Permissions.33[0m”
chown -R root:root /opt/firefox
chmod -R a+r /opt/firefox
echo -e “33[33mCleaning up download files.33[0m”
rm -f /tmp/firefox-i686-linux-gtk2+xft.tar.gz
rm -f /tmp/wget-log
echo -e “33[33mFirefox Update Complete.33[0m”
if test ! -f /usr/bin/firefox-nightly
then echo /opt/firefox/firefox > /usr/bin/firefox-nightly;chmod 755 /usr/bin/firefox-nightly;fi
echo -e “33[33mRun Firefox with the firefox-nightly command.33[0m”—Thunderbird0.8—
echo -e “33[33mThunderbird Nightly Update Script v0.833[0m”
echo -e “33[33mBy Matthew Young33[0m”
echo -e “33[33mReleased under the GNU GPL v233[0m”
if test ! -O /root
then echo -e “33[33mScript must be ran by root33[0m”;exit;fi
cd /tmp
rm -f thunderbird-i686-linux-gtk2+xft.tar.gz
rm -f /tmp/wget-log
echo -e “33[33mDownloading Mozilla Thunderbird with WGet.Please wait….33[0m”
wget http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-0.8/thunderbird-i686-linux-gtk2+xft.tar.gz
if test ! -f /tmp/thunderbird-i686-linux-gtk2+xft.tar.gz
then echo -e “33[33mDownload Failed33[0m”;exit;fi
echo -e “33[33mExtracting Thunderbird.Please Wait…33[0m”
tar -xzf thunderbird-i686-linux-gtk2+xft.tar.gz
if test ! -d /tmp/thunderbird
then echo -e “33[33mExtracting Failed33[0m”;exit;fi
echo -e “33[33mMaking backup33[0m”
rm -dfr /opt/thunderbird.old
if test -d /opt/thunderbird
then mv -f /opt/thunderbird /opt/thunderbird.old;fi
echo -e “33[33mInstalling Thunderbird in /opt33[0m”
mv /tmp/thunderbird /opt
echo -e “33[33mSetting Permissions.33[0m”
chown -R root:root /opt/thunderbird
chmod -R a+r /opt/thunderbird
echo -e “33[33mCleaning up download files.33[0m”
rm -f thunderbird-i686-linux-gtk2+xft.tar.gz
rm -f /tmp/wget-log
echo -e “33[33mThunderbird Update Complete.33[0m”
if test ! -f /usr/bin/thunderbird-nightly
then echo /opt/thunderbird/thunderbird > /usr/bin/thunderbird-nightly;chmod 755 /usr/bin/thunderbird-nightly;fi
echo -e “33[33mRun Thunderbird with the thunderbird-nightly command.33[0m”Sve sam isprobao i radi.
-
AutorČlanci
Forum ‘Softver’ je zaključan za nove teme i odgovore.