-
-
Save grenade/3b3c5b17586881d01142 to your computer and use it in GitHub Desktop.
#!/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}" |
#!/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-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 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}" |
#!/bin/sh | |
# golang install (last update: Thursday 31 May 2018) | |
# No need to download this script, just run it on your terminal: | |
# curl -L https://gist.github.com/grenade/3b3c5b17586881d01142/raw/update_golang.sh | sh | |
OS="linux" | |
INSTALL_DIR_PARENT="/usr/local" | |
if [[ "$(uname -m)" = "x86_64" ]]; then | |
ARCHITECTURE="amd64" | |
else | |
ARCHITECTURE="386" | |
fi | |
# todo: obtain latest checksum and validate download | |
VERSION="$(echo $(curl -s https://golang.org/dl/) | sed -rn "s#.*<a class=\"download downloadBox\" href=\"https:\/\/dl\.google\.com\/go\/go([0-9\.]+)\.${OS}-${ARCHITECTURE}\.tar\.gz\">.*#\1#p")" | |
ARCHIVE="go${VERSION}.${OS}-${ARCHITECTURE}.tar.gz" | |
INSTALL_DIR="${INSTALL_DIR_PARENT}/go${VERSION}.${OS}-${ARCHITECTURE}" | |
rm -f ${HOME}/Downloads/${ARCHIVE} | |
curl -o ${HOME}/Downloads/${ARCHIVE} https://dl.google.com/go/${ARCHIVE} | |
sudo rm -rf ${INSTALL_DIR} | |
sudo mkdir -p ${INSTALL_DIR} | |
if sudo tar -C ${INSTALL_DIR} -xzf ${HOME}/Downloads/${ARCHIVE}; then | |
sudo rm -rf /usr/local/go | |
sudo ln -sf ${INSTALL_DIR}/go /usr/local/go | |
rm -f ${HOME}/Downloads/${ARCHIVE} | |
fi | |
echo "" | |
echo "go ${VERSION} installed." |
#!/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" |
#!/bin/sh | |
# Sublime Text 3 Install (last update: Monday 8 April 2019) | |
# No need to download this script, just run it on your terminal: | |
# curl -sL 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") | |
echo "detected available release: ${BUILD}" | |
URL="https://download.sublimetext.com/sublime_text_3_build_${BUILD}_${ARCHITECTURE}.tar.bz2" | |
if [ -L /usr/local/bin/subl ] && [ -e /usr/local/bin/subl ]; then | |
EXISTING_INSTALLATION_DIR=$(dirname $(readlink /usr/local/bin/subl)) | |
echo "detected previous install at: ${EXISTING_INSTALLATION_DIR}" | |
INSTALLATION_DIR=$(dirname ${EXISTING_INSTALLATION_DIR})/sublime_text_${BUILD} | |
else | |
INSTALLATION_DIR="/opt/sublime_text_${BUILD}" | |
fi | |
echo "install dir set to: ${INSTALLATION_DIR}" | |
# Download the tarball, unpack and install | |
if curl -o ${HOME}/st3.tar.bz2 ${URL}; then | |
echo | |
echo "downloaded: ${HOME}/st3.tar.bz2 from: ${URL}" | |
rm -rf ${HOME}/sublime_text_3 | |
if tar -xf ${HOME}/st3.tar.bz2 --directory=${HOME}; then | |
if [ -d "${INSTALLATION_DIR}" ] && sudo rm -rf ${INSTALLATION_DIR}; then | |
echo "deleted: ${INSTALLATION_DIR}" | |
fi | |
sudo mv ${HOME}/sublime_text_3 ${INSTALLATION_DIR} | |
sudo rm -f /opt/sublime_text | |
sudo ln -sf ${INSTALLATION_DIR} /opt/sublime_text | |
sudo ln -sf ${INSTALLATION_DIR}/sublime_text /usr/local/bin/subl | |
# Add to applications list | |
if sed -i -e 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/256x256\/sublime-text.png/g' ${INSTALLATION_DIR}/sublime_text.desktop; then | |
echo "icon path set in: ${INSTALLATION_DIR}/sublime_text.desktop" | |
fi | |
if sudo ln -sf ${INSTALLATION_DIR}/sublime_text.desktop /usr/share/applications/sublime_text.desktop; then | |
echo "symlink: /usr/share/applications/sublime_text.desktop created with target: ${INSTALLATION_DIR}/sublime_text.desktop" | |
fi | |
echo | |
echo "sublime text 3 installation complete." | |
echo "run with: subl" | |
else | |
echo "failed to extract: ${HOME}/st3.tar.bz2 to: ${HOME}" | |
fi | |
if rm ${HOME}/st3.tar.bz2; then | |
echo "deleted: ${HOME}/st3.tar.bz2" | |
else | |
echo "failed to delete: ${HOME}/st3.tar.bz2" | |
fi | |
else | |
echo "failed to download: ${HOME}/st3.tar.bz2 from: ${URL}" | |
fi |
Ok so it somehow works, but it makes firefox directory in home folder, strange hmmm, so I make it hidden folder and create alias for it . My last question: would FF notify me about updates or rather create cron job for it?
Why not populate the ~/.local/share/icons
directory with the various icons/sizes and set Icon=ffd.png
or something like that?
Doesn't work at my F24 installation:
$ curl -L http://git.io/firefoxdev | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1866 100 1866 0 0 1590 0 0:00:01 0:00:01 --:--:-- 1590
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24719 0 24719 0 0 78104 0 --:--:-- --:--:-- --:--:-- 77977
curl: (3) [globbing] unmatched brace in column 99
curl: (6) Could not resolve host: html>
curl: (6) Could not resolve host: <html>
curl: (6) Could not resolve host: <head>
curl: (6) Could not resolve host: <meta
curl: (6) Could not resolve host: charset="UTF-8">
curl: (6) Could not resolve host: <title>Directory
curl: (6) Could not resolve host: Listing
curl: (3) <url> malformed
curl: (6) Could not resolve host: <
curl: (6) Could not resolve host: <body>
curl: (6) Could not resolve host: <h1>Index
curl: (6) Could not resolve host: of
…
thanks for the comments all! i finally got round to updating and tidying up both the dev and nightly scripts today. both should work more reliably again as they now use the officially supported url mechanisms for obtaining latest installers. eg:
Are you aware that the link points to Firefox Beta and not the Developer Edition?
i wasn't. thank you for pointing that out @RichieMcG. corrected now.
Hey, found your install script on the Ask Fedora site. Thanks, it's really neat. Couple of things I found in the Firefox developer edition script:
\/browser\/icons\/mozicon128.png
is way higher res if you've got a desktop that supports it.