Bash script to fetch and install Floorp browser in /opt

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
FloraMae
Posts: 71
Joined: Thu May 02, 2024 3:13 am
Has thanked: 11 times
Been thanked: 17 times

Bash script to fetch and install Floorp browser in /opt

Post by FloraMae »

So, still bored, so, changed my brave browser script to work with floorp browser.

This script fetches the latest x86_64 floorp browser for linux and puts it in /opt/floorp. Have not done any menu entries or anything yet, this is version one for anyone who wants to mess with it or try it.

Code: Select all

#!/bin/bash
########################################################################
##
## Floorp browser fetch for Puppy
##
## Tested: Bookwormpup64
##
## Requires: bash, curl, jq, grep, head
##
## Version: 1
##
########################################################################

## Basic deps check
APPARRAY=(curl jq grep head)
function check_deps(){
    for APP in "${APPARRAY[@]}"
    do
        which $APP > /dev/null 2>&1
        rc=$?
        if [ $rc == 0 ]; then
            continue
        fi

		echo "deps not satisfied, please open script to verify"
        exit 1
    done
}

check_deps

## Get the latest url release
url=$(curl --silent "https://api.github.com/repos/Floorp-Projects/Floorp/releases/latest" | jq --raw-output '.assets[] .browser_download_url' | grep 'linux-x86_64' | head -n1)

## Get it
wget -O './floorp.tar.bz2' "$url" -q --show-progress

## "install it"
mkdir -p /opt/floorp-browser
tar -xvf floorp.tar.bz2 -C /opt

Post Reply

Return to “Users”