Forked from grenade/update_firefox_developer_edition.sh
Created
November 15, 2015 11:26
-
-
Save MortalCatalyst/c5e830ffc2a81415dfba to your computer and use it in GitHub Desktop.
This script is based on another for Sublime Text (http://www.simonewebdesign.it/install-sublime-text-3-on-linux/). It will handle updates (detects the latest developer edition), locale (using your $LANG environment variable) and architecture (only tested on a 64 bit system, feedback welcome).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Firefox Developer Edition install | |
# No need to download this script, just run it on your terminal: | |
# $ curl -L git.io/firefoxdev | sh | |
# When you need to update Firefox Developer Edition, run this script again. | |
START_CMD="ffd" | |
INSTALLATION_DIR="/opt/firefox" | |
# Detect the architecture | |
if [ "$(uname -m)" = "x86_64" ]; then | |
ARCHITECTURE="x86_64" | |
else | |
ARCHITECTURE="i686" | |
fi | |
# Detect the locale | |
LOCALE=$(echo $LANG | sed -r 's/([a-z]{2})_([A-Z]{2}).*/\1-\2/') | |
# Detect the latest build version | |
BUILD=$(echo $(curl https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-aurora-l10n/linux-$ARCHITECTURE/xpi/) | sed -r "s/.*firefox-([0-9\.a]+)\.$LOCALE\.langpack\.xpi.*/\1/") | |
URL="https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-aurora-l10n/firefox-{$BUILD}.{$LOCALE}.linux-{$ARCHITECTURE}.tar.bz2" | |
# Download the tarball, unpack and install | |
curl -o $HOME/$START_CMD.tar.bz2 $URL | |
if tar -xf $HOME/$START_CMD.tar.bz2 --directory=$HOME; then | |
# Create an application launcher file based on the regular firefox launcher | |
cat /usr/share/applications/firefox.desktop | sed -r 's/Name=Firefox/Name=Firefox Developer Edition/g' | sed -r 's/Exec=firefox %u/Exec=ffd %u/g' | sed -r "s/Icon=firefox/Icon=$(echo $INSTALLATION_DIR | sed -r 's/\//\\\//g')\/browser\/chrome\/icons\/default\/default48.png/g" > $HOME/firefox/firefox.desktop | |
# Remove the installation folder and the symlink, they might already exist | |
sudo rm -rf $INSTALLATION_DIR /bin/$START_CMD | |
sudo mv $HOME/firefox $INSTALLATION_DIR | |
sudo ln -s $INSTALLATION_DIR/firefox /bin/$START_CMD | |
fi | |
rm $HOME/$START_CMD.tar.bz2 | |
# Add to applications list | |
sudo ln -s $INSTALLATION_DIR/firefox.desktop /usr/share/applications/$START_CMD.desktop | |
echo "" | |
echo "Firefox Developer Edition installed successfully!" | |
echo "Run with: $START_CMD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Firefox Nightly Edition install | |
# No need to download this script, just run it on your terminal: | |
# $ curl -L https://gist.githubusercontent.com/grenade/3b3c5b17586881d01142/raw/update_firefox_nightly_edition.sh | sh | |
# When you need to update Firefox Nightly Edition, run this script again. | |
START_CMD="ffd" | |
INSTALLATION_DIR="/opt/firefox" | |
# Detect the architecture | |
if [ "$(uname -m)" = "x86_64" ]; then | |
ARCHITECTURE="x86_64" | |
else | |
ARCHITECTURE="i686" | |
fi | |
# Detect the locale | |
#LOCALE=$(echo $LANG | sed -r 's/([a-z]{2})_([A-Z]{2}).*/\1-\2/') | |
LOCALE="en-US" | |
# Detect the latest build version | |
BUILD=$(echo $(curl https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/) | sed -r "s/.*firefox-([0-9\.a]+)\.$LOCALE\.langpack\.xpi.*/\1/") | |
URL="https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-{$BUILD}.{$LOCALE}.linux-{$ARCHITECTURE}.tar.bz2 | |
# Download the tarball, unpack and install | |
curl -o $HOME/$START_CMD.tar.bz2 $URL | |
if tar -xf $HOME/$START_CMD.tar.bz2 --directory=$HOME; then | |
# Create an application launcher file based on the regular firefox launcher | |
cat /usr/share/applications/firefox.desktop | sed -r 's/Name=Firefox/Name=Firefox Developer Edition/g' | sed -r 's/Exec=firefox %u/Exec=ffd %u/g' | sed -r "s/Icon=firefox/Icon=$(echo $INSTALLATION_DIR | sed -r 's/\//\\\//g')\/browser\/chrome\/icons\/default\/default48.png/g" > $HOME/firefox/firefox.desktop | |
# Remove the installation folder and the symlink, they might already exist | |
sudo rm -rf $INSTALLATION_DIR /bin/$START_CMD | |
sudo mv $HOME/firefox $INSTALLATION_DIR | |
sudo ln -s $INSTALLATION_DIR/firefox /bin/$START_CMD | |
fi | |
rm $HOME/$START_CMD.tar.bz2 | |
# Add to applications list | |
sudo ln -s $INSTALLATION_DIR/firefox.desktop /usr/share/applications/$START_CMD.desktop | |
echo "" | |
echo "Firefox Developer Edition installed successfully!" | |
echo "Run with: $START_CMD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Skype install | |
# No need to download this script, just run it on your terminal: | |
# $ curl -L https://gist.githubusercontent.com/grenade/3b3c5b17586881d01142/raw/update_skype.sh | sh | |
# When you need to update Skype, run this script again. | |
START_CMD="skype" | |
INSTALLATION_DIR="/opt/skype" | |
URL="http://www.skype.com/go/getskype-linux-beta-dynamic" | |
# Download the tarball, unpack and install | |
curl -L -o $HOME/$START_CMD.tar.bz2 $URL | |
if tar -xf $HOME/$START_CMD.tar.bz2 --directory=$HOME; then | |
# Remove the installation folder and the symlink, they might already exist | |
sudo rm -rf $INSTALLATION_DIR /bin/$START_CMD | |
sudo mv $HOME/skype-* $INSTALLATION_DIR | |
sudo ln -s $INSTALLATION_DIR/skype /bin/$START_CMD | |
fi | |
rm $HOME/$START_CMD.tar.bz2 | |
# Add to applications list | |
for i in 16 32 48 64 128; do sudo cp $INSTALLATION_DIR/icons/SkypeBlue_${i}x${i}.png /usr/share/icons/hicolor/${i}x$i/apps/$START_CMD.png; done | |
sudo ln -s $INSTALLATION_DIR/skype.desktop /usr/share/applications/$START_CMD.desktop | |
# Install dependencies | |
sudo dnf install -y libX11.i686 libv4l.i686 alsa-plugins-pulseaudio.i686 qt-x11.i686 libXScrnSaver.i686 libXv-1.0.10-2.fc22.i686 qtwebkit-2.3.4-6.fc22.i686 | |
echo "" | |
echo "Skype installed successfully!" | |
echo "Run with: $START_CMD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment