This scrips takes the argument of a Firefox file and installs it in a user-friendly manner.
Specifically, the script:
- Checks file existance
- Moves it to a local assets/ folder
- Moves the existing installation to /opt/firefox.OLD for rollback if requried
- Unpacks the tar.bz file in /opt/firefox
- creates a symlink for the executable at /usr/local/bin/firefox
- checks for the existance of a .desktop file in the assets folder
- creats a symlink for the .desktop file at /usr/local/share/applications/firefox.desktop
- updates ownership of /opt/firefox to mike:mike so firefox has write permissions and can check for updates
Usage
sudo ./installer