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
    1 month ago
  • [url=https://mp3fm.mobi/]mp3 скачать бесплатно[/url]


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    Submitted by Alfredexcef
    1 month 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
    1 month ago
  • [url=https://mp3dream.site/]песня ночь[/url]


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    Submitted by Bobbyderge
    4 weeks ago
  • [url=https://hotmp3.xyz]какую музыку[/url]


    Submitted by Matthewguisa
    1 week ago
  • [url=https://diskomusic.xyz]музыка mp3 бесплатно качество[/url]


    Submitted by Thomasaboro
    1 week ago
  • [url=https://kachaimp3.xyz]давай песню[/url]


    Submitted by Richardflask
    1 week ago
  • [url=https://formusic.xyz]песнь песней скачать бесплатно[/url]


    Submitted by DennisInven
    1 week ago
  • [url=https://mp3planet.xyz]скачать песни в качестве[/url]


    Submitted by Clintonrot
    1 week ago
  • [url=https://mp3ru.xyz]музыка mp3[/url]


    Submitted by TimothyDom
    1 week ago
  • [url=https://playmp3.xyz]песнь песней онлайн[/url]


    Submitted by JeffreyDrolo
    1 week ago
  • [url=https://mp3sound.xyz]песнь песней скачать бесплатно[/url]


    Submitted by WilsonEndat
    1 week ago
  • [url=https://8tracks.xyz]песни бесплатно[/url]


    Submitted by CharlesDaype
    1 week ago
  • [url=https://justmp3.xyz]песня тока тока[/url]


    Submitted by Davidruilm
    1 week ago
  • [url=https://omgmp3.xyz]новинки mp3[/url]


    Submitted by Frankreink
    1 week ago
  • [url=https://mp3super.xyz]слушать песни 2021[/url]


    Submitted by RobertHainc
    1 week ago
  • [url=https://rapmp3.xyz]песня черный[/url]


    Submitted by RaymondEnect
    1 week ago
  • [url=https://musplayer.xyz]песня тока тока[/url]


    Submitted by Briancob
    1 week ago
  • [url=https://soundplayer.xyz]популярная музыка бесплатно[/url]


    Submitted by MichaelSag
    1 week ago
  • [url=https://checkmusic.xyz]музыка 2021 слушать[/url]


    Submitted by Randaljof
    1 week ago
  • [url=https://audiomp3.xyz]песнь песней текст[/url]


    Submitted by Leonardbrumn
    1 week ago
  • [url=https://audiomuz.xyz]песня слезы[/url]


    Submitted by AaronBog
    1 week ago
  • [url=https://tonsofmp3.xyz]текст песнь[/url]


    Submitted by Chrismah
    1 week ago
  • [url=https://topvolume.xyz]песни бесплатно mp3[/url]


    Submitted by Bennyfab
    1 week ago
  • [url=https://lotofmp3.xyz]лучшие песни онлайн бесплатно[/url]


    Submitted by Jeremynup
    2 days ago
  • [url=https://musicsoul.xyz]популярная музыка 2021[/url]


    Submitted by ClaudePer
    2 days ago
  • [url=https://rusmusic.xyz]песня танцующий[/url]


    Submitted by Ernestseelm
    2 days ago
  • [url=https://rusmp3.xyz]скачать песни mp3[/url]


    Submitted by JosephTroug
    2 days ago
  • [url=https://vsemp3.xyz]песни бесплатно mp3[/url]


    Submitted by JarodExine
    2 days ago
  • [url=https://gromko.xyz]песнь 2021[/url]


    Submitted by Israeledigh
    1 day ago
  • [url=https://laudsound.xyz]что за музыка играет[/url]


    Submitted by Joshuahiz
    1 day ago
  • [url=https://mp3bass.xyz]слушать песни 2021[/url]


    Submitted by GroverTeage
    1 day ago
  • [url=https://skymusic.xyz]бесплатно mp3 все песни в хорошем качестве[/url]


    Submitted by Shawnhoave
    1 day ago
  • [url=https://usemusic.xyz]скачать музыку[/url]


    Submitted by Brianthodo
    23 hours ago
  • [url=https://musicway.xyz]сборник музыки[/url]


    Submitted by Jamesvaw
    11 hours ago
  • [url=https://mpthree.xyz]слушать русские песни[/url]


    Submitted by ThomasKer
    9 hours ago
  • [url=https://mp3map.xyz]что за музыка играет[/url]


    Submitted by Lamardus
    7 hours ago
  • [url=https://mp3energy.xyz]бесплатная популярная музыка 20201[/url]


    Submitted by AndresOpisk
    5 hours ago
  • [url=https://grandmp3.xyz]русская музыка 2021[/url]


    Submitted by Billyfum
    2 hours ago



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

© Copyright 2017 by Roger Pence. All rights reserved.