A Bash script to install Firefox Dev Edition

Posted on: Saturday, Feb 03, 2018

Installing an app manually on Ubuntu isn't much of a hassle, until you need to do it many times. Such is the case with the Firefox Dev Edition (FFDE). It rolls out new versions quickly (too quickly to keep the PPAs current) and it's important to stay current. This post provides a Bash script to automate the installation of FFDE--but could easily be modified to work with other apps.

Chrome has been my-goto WebDev browser for a long time. However, since the introduction of the FireFox Quantum family, FireFox (especially the Developer Edition) has earned a spot (again) on my must-have tools. The Developer Edition's CSS Grid Inspector is especially cool. Give FireFox another chance. If only to keep Chrome honest and to not become the IE of the 21st century!

Getting the number of the most recent FFDE version

This script would have been a little simpler if Mozilla provided the most recent download in a statically named file (such as "FirefoxDevEd-current.bz2"). However, it doesn't. There is, however, a "releases" page with the FFDE downloads available, with the most recent version at the bottom of the list. To keep this script as frictionless as possible it uses curl, grep, and tail to scrape the most current version number from that releases page. That process is detailed in this post.

This script stores FFDE in the /opt/firefox-dev folder. It asks for the sudo password while running.

After fetching the most recent FFDE version number and storing it in a Bash variable, this script:

  • Downloads the latest FFDE installation file
  • Unzips it
  • Adds the target folder /opt/firefox-dev if encessary
  • Clears out that target folder
  • Copies the new version to that target folder
  • Deletes unnecessary files

To uses the script below, put it a folder in your path and make it executable with:

chmod +x installffde 

Then, run it with

installffde 

This file makes is really easy to keep your version of Firefox Dev Edition current. The process takes about 30 seconds. See this post for instructions on creating a .desktop file for easy access to FFDE.

installffde - Bash script to install Firefox Dev Edition
#!/usr/bin/env bash

# Get the lastest FFDE version number.
curl -o releases.txt https://download-installer.cdn.mozilla.net/pub/devedition/releases/
VERSION=$(grep -o '[0-9][0-9]\.[0-9][a-z][0-9]' releases.txt | tail -1)    
rm releases.txt    

# Get download file name.
FILE=firefox-$VERSION.tar.bz2

# Create /opt/firefox-dev if it doesn't exist.
if [ ! -d "/opt/firefox-dev" ]
then 
    sudo mkdir /opt/firefox-dev
fi

# Get Firefox download.
curl -o $FILE https://download-installer.cdn.mozilla.net/pub/devedition/releases/$VERSION/linux-x86_64/en-US/$FILE

# If you don't get the file you specified, you get an HTML file with a 
#'404 Not found' text in it.
if grep -iq '404 Not found' $FILE 
then
    clear
    echo Error...
    echo $FILE did not download.
    rm $FILE
    exit 
fi

# Unzip the install file.
tar xvjf $FILE

# Clear the target directory.
sudo rm -rf /opt/firefox-dev/*

# Move the program files to the target directory.
sudo mv firefox/* /opt/firefox-dev

# Remove the unzipped install folder.
rm -rf firefox

# Remove the install file.
rm $FILE

echo Firefox Dev Ed $1 installed.

Bash script to install Firefox Dev Edition 


Comments

  • Thanks Roger. This script worked perfectly.


    Submitted by Amol
    2 years ago
  • Thanks for reading, Amol. Glad it worked for you.


    Submitted by rp
    2 years ago
  • Perfect script. I was ready to write it by my own, and finally I've found your gem! Thanks a lot!


    Submitted by Alex
    1 year ago
  • Hi, here on the forum guys advised a cool Dating site, be sure to register - you will not REGRET it [url=https://bit.ly/34nj4Ab]Love-Angels[/url]


    Submitted by KennethReria
    4 weeks ago
  • [url=https://mp3fm.mobi/]mp3 скачать бесплатно[/url]


    Submitted by Douglaswax
    4 weeks ago
  • [url=https://best-rupesni.com/]нова песня[/url]


    Submitted by Norrisdam
    4 weeks ago
  • [url=https://oceanmp3.mobi/]песня видео[/url]


    Submitted by Leslieimput
    4 weeks ago
  • [url=https://mp3bank.mobi/]песнь популярные[/url]


    Submitted by GordonAncen
    4 weeks ago
  • [url=https://free-pesni.mobi/]скачать песни mp3[/url]


    Submitted by Jamestat
    4 weeks ago
  • [url=https://mp3pesnya.mobi/]песни[/url]


    Submitted by LeonardSic
    4 weeks ago
  • [url=https://soundfm.mobi/]новинки песен 2021[/url]


    Submitted by MichaelAbact
    4 weeks ago
  • [url=https://thepesnya.com/]музыка бесплатно 2021[/url]


    Submitted by WilliamAporp
    4 weeks ago
  • [url=https://freemp3.xyz/]песня года[/url]


    Submitted by WilliamAporp
    4 weeks ago
  • [url=https://litemusic.xyz/]слушать музыку бесплатно без[/url]


    Submitted by JohnnySlorp
    4 weeks ago
  • [url=https://azermp3.com/]под музыку[/url]


    Submitted by Manuelaredy
    4 weeks ago
  • [url=http://am-mus.com/]песня давай давай даю даю[/url]


    Submitted by Elliotbah
    3 weeks ago
  • [url=http://kzmus.com/]слушать музыку новинки[/url]


    Submitted by Jamesfak
    3 weeks ago
  • [url=http://muskg.com/]новые песни[/url]


    Submitted by Kennethspelf
    3 weeks ago
  • [url=https://tjmus.com/]песня снова[/url]


    Submitted by WilliamDaw
    3 weeks ago
  • [url=https://mp3-tm.com/]слушать музыку[/url]


    Submitted by Stevenimmuh
    3 weeks ago
  • [url=https://mp3-uz.com/]минус песни[/url]


    Submitted by StevendydaY
    3 weeks ago
  • [url=https://uk-mus.com/]песни группы[/url]


    Submitted by Alfredexcef
    3 weeks ago
  • Hi, here on the forum guys advised a cool Dating site, be sure to register - you will not REGRET it [url=https://bit.ly/34nj4Ab]https://bit.ly/34nj4Ab[/url]


    Submitted by WilliamTIELL
    3 weeks ago
  • [url=https://mp3dream.site/]песня ночь[/url]


    Submitted by Jesusaninc
    3 weeks ago
  • [url=https://coolmp3.site/]популярные песни[/url]


    Submitted by JerryExtep
    3 weeks ago
  • [url=https://mp3dance.xyz/]песни 2021 бесплатно[/url]


    Submitted by Marvindak
    3 weeks ago
  • [url=https://vsepesni.site/]популярная музыка 2021 слушать[/url]


    Submitted by Davidelden
    3 weeks ago
  • [url=https://treki.site/]слушать музыку без[/url]


    Submitted by Frankjeoca
    3 weeks ago
  • [url=https://mp3box.site/]песнь песней[/url]


    Submitted by Scottguide
    3 weeks ago
  • [url=https://topmuzyka.mobi/]песнь песней текст[/url]


    Submitted by Jamesodoth
    3 weeks ago
  • [url=https://pesnitop.xyz/]песня клип[/url]


    Submitted by Vincenttit
    3 weeks ago
  • [url=https://topmelody.site/]с днем рождения дне песня[/url]


    Submitted by RussellHeshy
    3 weeks ago
  • [url=https://music-free.online/]песни 90[/url]


    Submitted by Charlescef
    3 weeks ago
  • [url=https://muzicon.site/]музыка на звонок[/url]


    Submitted by Changbussy
    3 weeks ago
  • [url=https://newsong.site/]белым бела песня[/url]


    Submitted by EliasDosse
    3 weeks ago
  • [url=https://popsong.site/]новинки песнь[/url]


    Submitted by Scottbaw
    3 weeks ago
  • [url=https://mp3click.site/]песни[/url]


    Submitted by MatthewDok
    3 weeks ago
  • [url=https://pesnya.site/]скачать музыку на телефон[/url]


    Submitted by Perrysat
    3 weeks ago
  • [url=https://thesong.site/]слушать музыку онлайн бесплатно без остановки[/url]


    Submitted by RamiroEnsub
    3 weeks ago
  • [url=https://mp3store.site/]музыка mp3[/url]


    Submitted by Jamesnot
    3 weeks ago
  • [url=https://mp3force.site/]музыка онлайн слушать 2021[/url]


    Submitted by GerardNorry
    3 weeks ago
  • [url=https://ourmusic.site/]скачать русские песни[/url]


    Submitted by Howardreops
    3 weeks ago
  • [url=https://funmusic.mobi/]музыка самая самая[/url]


    Submitted by Bobbysmisk
    3 weeks ago
  • [url=https://topsound.mobi]песни[/url]


    Submitted by RussellTot
    3 weeks ago
  • [url=https://loudmp3.mobi]музыка 2021 бесплатно mp3[/url]


    Submitted by RonnieKalry
    3 weeks ago
  • [url=https://artmusic.mobi]белым бела песня[/url]


    Submitted by Timothycom
    3 weeks ago
  • [url=https://funmusic.mobi]слушать музыку остановка[/url]


    Submitted by Henryfam
    3 weeks ago
  • [url=https://vsetreki.mobi]песни онлайн слушать бесплатно[/url]


    Submitted by JamesEasef
    3 weeks ago
  • [url=https://bestmusic.mobi]музыка бесплатно[/url]


    Submitted by Georgeanize
    3 weeks ago
  • [url=https://coolsong.mobi]песни скачать бесплатно mp3 в хорошем качестве[/url]


    Submitted by ArthurDoots
    3 weeks ago
  • [url=https://onrepeat.mobi]песни мп3 бесплатно[/url]


    Submitted by JamesMic
    3 weeks ago
  • [url=https://mp3bit.mobi]mp3 скачать бесплатно[/url]


    Submitted by KennethPub
    3 weeks ago
  • [url=https://newmp3.top]данные песни[/url]


    Submitted by Williamsom
    3 weeks ago
  • [url=https://playmusic.top]качество музыки mp3[/url]


    Submitted by Herbertapege
    3 weeks ago
  • [url=https://firemp3.xyz]красивые песни[/url]


    Submitted by ChrisCab
    3 weeks ago
  • [url=https://justmp3.xyz]поем песни[/url]


    Submitted by Williamrot
    2 weeks ago
  • [url=https://newfm.xyz/]нова песня[/url]


    Submitted by Jerrysloda
    2 weeks ago
  • [url=https://justmusic.xyz]суть песни[/url]


    Submitted by StevenTauth
    2 weeks ago
  • [url=https://zvuq.xyz]mp3 скачать 2021[/url]


    Submitted by Bobbyderge
    2 weeks ago



Add your comment
You email is never shared with anyone else.

© Copyright 2017 by Roger Pence. All rights reserved.