Thursday, April 16, 2009

swiftweasel 軟體安裝加入列表的shell

#!/bin/sh
#
# This script installs Swiftfox

# Download Swiftfox
echo " "
echo "Password required to install to /opt directory..."
echo " "
cd /opt
#sudo wget http://getswiftweasel.com/builds/releases/3.0.4pre-1/swiftweasel-3.0.4pre-1-prescott.tar.bz2

# Install Swiftfox
echo " "
echo "Installing HAHA..."

# If there is an existing swiftweasel install here let's move it out of the way
#sudo mv swiftweasel swiftweasel.old

# Extract the build
#sudo tar -jxf swiftweasel-3.0.4pre-1-prescott.tar.bz2

# Search for plugins
echo " "
echo "Searching for existing plugins, errors can be safely ignored..."
sudo cp swiftweasel.old/plugins/* swiftweasel/plugins
sudo cp /usr/lib/firefox/plugins/* swiftweasel/plugins
sudo cp /usr/lib/mozilla/plugins/* swiftweasel/plugins
sudo cp /usr/lib/mozilla-firefox/plugins/* swiftweasel/plugins
sudo cp /usr/lib/browser-plugins/* swiftweasel/plugins
sudo cp /usr/lib/xulrunner-addons/plugins/* swiftweasel/plugins

# Make sure root owns the Swiftfox directory
sudo chown -hR root:root swiftweasel

# Add link in /usr/bin
sudo ln -s /opt/swiftweasel/swiftweasel /usr/bin/swiftweasel

# Add Swiftfox to menu
#cd /usr/share/applications
#sudo wget http://getswiftweasel.com/builds/installer/Swiftfox.desktop

# Remove the downloaded tarball
#sudo rm /opt/swiftweasel-3.0.4pre-1-prescott.tar.bz2

echo " "
echo "Swiftfox has been installed. Happy Surfing!"
echo " "
exit

要加入程式啟動表內
#cd /usr/share/applications
vi swiftweasel.desktop

[Desktop Entry]
Comment=Web Browser
Comment[en_US]=Web Browser
Encoding=UTF-8
Exec=/opt/swiftweasel/swiftweasel
GenericName=Web Browser
GenericName[en_US]=Web Browser
Icon=/opt/swiftweasel/icons/mozicon128.png
Name=Swiftweasel
Name[en_US]=Swiftweasel
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Categories=Application;Network;

No comments: