From 1cf8e97936c00f875a35a10b2278f15248db6a33 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sun, 28 Dec 2025 13:26:52 +0100 Subject: [PATCH] Added sidebar, deteiled functions and porting page --- Home.md | 86 ++++++++++++++++++------------------------- _Sidebar.md | 3 ++ detailed_functions.md | 53 ++++++++++++++++++++++++++ porting.md | 2 + 4 files changed, 93 insertions(+), 51 deletions(-) create mode 100644 _Sidebar.md create mode 100644 detailed_functions.md create mode 100644 porting.md diff --git a/Home.md b/Home.md index a2c9385..1052b2b 100644 --- a/Home.md +++ b/Home.md @@ -9,9 +9,9 @@ This script was initially designed to just update my Helium browser but over tim - Remove Helium -- Add and update Desktop Launcher +- Add and update Desktop Launcher with extra functionality -- Add alias to `.shellrc` +- Add alias to `.shellrc` --> _tested with bash and zsh_ - Compare local and remote version @@ -20,57 +20,41 @@ This script was initially designed to just update my Helium browser but over tim - Update `helium_helper.sh` - Help - -## Functions in detail -### No parameter -1. Run dependency check for every "special" command needed for the script - 1\. **TRUE** | proceed - 2\. **FALSE** | tell what's missing && exit -2. Check for Helium folder & executable - 1\. **TRUE** | proceed - 2\. **FALSE** | tell what's missing && ask to install Helium or exit -3. Update Helium - 1\. See update process -4. Check for temporary directory, remove if present && exit -### Install process -1. Check for Helium executable - 1\. **TRUE** | try to update helium - 2\. **FALSE** | ask for install confirmation && proceed or exit -2. Get latest download URL & file name with `curl` -3. Download given file to `tmp` with `wget` -4. Make file executable `chmod` -5. Create app folder -6. Move file to app folder -7. Ask to add launcher - 1\. **TRUE** | run add launcher function && proceed - 2\. **FALSE** | proceed -8. Check for temporary directory, remove if present && exit +See [[detailed functions|detailed_functions]] for more information. -### Update process -1. Check local and remote version tags - 1\. **TRUE** | proceed - 2\. **FALSE** | tell whats wrong && exit -2. Compare local and remote version tags - 1\. **EQUAL** | tell okay && exit - 2\. **GT** | show local and remote version && ask for confirmation && proceed or exit - 3\. **ELSE** | show local and remote version && exit -3. Create `tmp` & `backup` path -4. Download file to `tmp` with `wget` -5. Make file executable `chmod` -6. Check for old backup and remove if existent -7. Move outdated file to `backup` -8. Move latest file to Helium folder -9. Create `backup` of launcher -10. Update Launcher (version number) `sed` -11. Check for temporary directory, remove if present && exit +## Usage +get help +```sh +./helium_helper.sh -h +``` +### First Install +To initally install Helium browser via this script, download helium_helper.sh and make it executable: +```sh +wget https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/helium_helper.sh && chmod +x helium_helper.sh +``` +Run script with install parameter **-i** +```sh +./helium_helper.sh -i +``` +Add alias to `.shellrc` | _optional_ +```sh +./helium_helper.sh -a ### ONLY TESTED WITH zsh & bash +``` +--- +### Updating +**From launcher** (if added) -### Removal process -1. Check presence of Helium folder - 1\. **TRUE** | ask for removal confirmation && proceed or exit - 2\. **FALSE** | tell && exit -2. Remove Helium folder -3. Remove launcher if present -4. Remove alias if present +Checking for the latest version and updating can simply be done for the browser as well as the script by right clicking the app icon and choosing either update option, which will be run by `helium_launcher_update.sh`. This will backup all files that are being updated and write a log. +**Terminal** + +Updating can also be done by running: +```sh +./helium_helper.sh -u ### UPDATE APP +``` +```sh +./helium_helper.sh -S ### UPDATE SCRIPT +``` +Since this script is interactive, it doesn't keep logs.   \ No newline at end of file diff --git a/_Sidebar.md b/_Sidebar.md new file mode 100644 index 0000000..2732b3c --- /dev/null +++ b/_Sidebar.md @@ -0,0 +1,3 @@ +1. [[Introduction|Home]] +2. [[Functions in detail|detailed_functions]] +3. [[Porting|porting]] \ No newline at end of file diff --git a/detailed_functions.md b/detailed_functions.md new file mode 100644 index 0000000..95f7a98 --- /dev/null +++ b/detailed_functions.md @@ -0,0 +1,53 @@ +# Functions in detail +## No parameter +1. Run dependency check for every "special" command needed for the script + 1\. **TRUE** | proceed + 2\. **FALSE** | tell what's missing && exit +2. Check for Helium folder & executable + 1\. **TRUE** | proceed + 2\. **FALSE** | tell what's missing && ask to install Helium or exit +3. Update Helium + 1\. See update process +4. Check for temporary directory, remove if present && exit + +## Install process +1. Check for Helium executable + 1\. **TRUE** | try to update helium + 2\. **FALSE** | ask for install confirmation && proceed or exit +2. Get latest download URL & file name with `curl` +3. Download given file to `tmp` with `wget` +4. Make file executable `chmod` +5. Create app folder +6. Move file to app folder +7. Ask to add launcher + 1\. **TRUE** | run add launcher function && proceed + 2\. **FALSE** | proceed +8. Check for temporary directory, remove if present && exit + +## Update process +1. Check local and remote version tags + 1\. **TRUE** | proceed + 2\. **FALSE** | tell whats wrong && exit +2. Compare local and remote version tags + 1\. **EQUAL** | tell okay && exit + 2\. **GT** | show local and remote version && ask for confirmation && proceed or exit + 3\. **ELSE** | show local and remote version && exit +3. Create `tmp` & `backup` path +4. Download file to `tmp` with `wget` +5. Make file executable `chmod` +6. Check for old backup and remove if existent +7. Move outdated file to `backup` +8. Move latest file to Helium folder +9. Create `backup` of launcher +10. Update Launcher (version number) `sed` +11. Check for temporary directory, remove if present && exit + +## Removal process +1. Check presence of Helium folder + 1\. **TRUE** | ask for removal confirmation && proceed or exit + 2\. **FALSE** | tell && exit +2. Remove Helium folder +3. Remove launcher if present +4. Remove alias if present + +  \ No newline at end of file diff --git a/porting.md b/porting.md new file mode 100644 index 0000000..aeca9a7 --- /dev/null +++ b/porting.md @@ -0,0 +1,2 @@ +# Porting this script +TBC... \ No newline at end of file