Forked from grenade/update_firefox_developer_edition.sh
Last active
May 22, 2019 12:52
-
-
Save RichieMcG/79cdf3b23657ce6eaa59fed893f772c0 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 or nightly edition) and locale (using your $LANG environment variable) (only tested on a 64 bit, fedora system, feedback welcome).
This file contains hidden or 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="firefox-dev" | |
INSTALLATION_DIR="/opt/${START_CMD}" | |
# Detect the locale | |
LOCALE=$(echo ${LANG/_/-} | cut -d. -f1) | |
# Download the tarball, unpack and install | |
URL="https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=${LOCALE}" | |
curl -L -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=${START_CMD} %u/g" | sed -r "s/Icon=firefox/Icon=$(echo ${INSTALLATION_DIR} | sed -r 's/\//\\\//g')\/browser\/chrome\/icons\/default\/default128.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 -sf ${INSTALLATION_DIR}/firefox.desktop /usr/share/applications/${START_CMD}.desktop | |
echo "" | |
echo "Firefox Developer Edition installed." | |
echo "Run with: ${START_CMD}" |
This file contains hidden or 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 git.io/firefoxnightly | sh | |
# When you need to update Firefox Nightly Edition, run this script again. | |
START_CMD="firefox-nightly" | |
INSTALLATION_DIR="/opt/${START_CMD}" | |
# Detect the locale | |
LOCALE=$(echo ${LANG/_/-} | cut -d. -f1) | |
# Download the tarball, unpack and install | |
URL="https://download.mozilla.org/?product=firefox-nightly-latest&os=linux64&lang=${LOCALE}" | |
curl -L -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 Nightly Edition/g' | sed -r "s/Exec=firefox %u/Exec=${START_CMD} %u/g" | sed -r "s/Icon=firefox/Icon=$(echo ${INSTALLATION_DIR} | sed -r 's/\//\\\//g')\/browser\/chrome\/icons\/default\/default128.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 -sf ${INSTALLATION_DIR}/firefox.desktop /usr/share/applications/${START_CMD}.desktop | |
echo "" | |
echo "Firefox Nightly Edition installed." | |
echo "Run with: ${START_CMD}" |
This file contains hidden or 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" |
This file contains hidden or 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 | |
# Sublime Text 3 Install (last update: Friday 30 March 2018) | |
# No need to download this script, just run it on your terminal: | |
# curl -L https://gist.github.com/grenade/3b3c5b17586881d01142/raw/update_sublime_text_3.sh | sh | |
# Detect the architecture | |
if [[ "$(uname -m)" = "x86_64" ]]; then | |
ARCHITECTURE="x64" | |
else | |
ARCHITECTURE="x32" | |
fi | |
# Fetch the latest build version number (thanks daveol) | |
BUILD=$(echo $(curl -s http://www.sublimetext.com/3) | sed -rn "s#.*<p class=\"latest\"><i>Version:<\/i> Build ([0-9]+)..*#\1#p") | |
URL="https://download.sublimetext.com/sublime_text_3_build_{$BUILD}_{$ARCHITECTURE}.tar.bz2" | |
INSTALLATION_DIR="/opt/sublime_text" | |
# Download the tarball, unpack and install | |
curl -o $HOME/st3.tar.bz2 $URL | |
if tar -xf $HOME/st3.tar.bz2 --directory=$HOME; then | |
sudo mv $HOME/sublime_text_3 $INSTALLATION_DIR | |
sudo ln -sf $INSTALLATION_DIR/sublime_text /usr/local/bin/subl | |
fi | |
rm $HOME/st3.tar.bz2 | |
# Add to applications list | |
sed -i -e 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/256x256\/sublime-text.png/g' ${INSTALLATION_DIR}/sublime_text.desktop | |
sudo ln -sf ${INSTALLATION_DIR}/sublime_text.desktop /usr/share/applications/sublime_text.desktop | |
echo "" | |
echo "Sublime Text 3 installed." | |
echo "Run with: subl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment