- Shell 100%
Create the user's `$HOME/Applications` directory on `curl` file download, as a simple solution to directory not-existing. To be reworked when adding better code iteration (if ever) in the future. |
||
|---|---|---|
| .gitignore | ||
| fluxer-update | ||
| README.md | ||
fluxer-update
Basic bash script to download the Fluxer's Linux x64 AppImages (stable+canary) and add to PATH. (makes many assumptions)
Downloads AppImage with name from server, then softlinks to a configured user path. Does not delete old AppImage's by default.
Potentially build this out for fun. Give more options. Add error checking? It's more for my learning, and some slight convenience for my personal use-case until a more consistently updated package is established.
Check Fluxer's links:
Fluxer Homepage
Fluxer GitHub (Fluxer Roadmap (2026))
Setup
Install
Download or clone to any directory, ideally an empty one of its own. Download or link main script to path to call in terminal.
Or, single-use to run with the defaults until flags are added.
curl -sL https://git.mana.pink/rubeae/fluxer-update/raw/branch/main/fluxer-update | bash
Config
Set user variables at top of script.
| Variable | Purpose | Default |
|---|---|---|
STABLEURL |
URL for Fluxer Stable AppImage. | https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage |
CANARYURL |
URL for Fluxer Canary AppImage. | https://api.canary.fluxer.app/dl/desktop/canary/linux/x64/latest/appimage |
DOWNLOADDIR |
Directory to download AppImages to. Downloads are expected to remain here. | $HOME/Applications |
INSTALLDIR |
Directory to link to the AppImages from. Expects it to be in $PATH. |
$HOME/.local/bin |
PERMS |
Permissions. 0500 at minimum. |
0755 |
STABLE_NAME |
Name to use for the symlink for Fluxer Stable. | fluxer-stable |
CANARY_NAME |
Name to use for the symlink for Fluxer Canary. | fluxer-canary |
PRIMARY_BRANCH |
Which branch of Fluxer to prefer when launching. | canary |
Behaviour
This script was written with the intent of downloading and symlinking the Fluxer AppImages from the main page. This behavior ideally would be changed to favor github in some future iteration if usefulness remains.
Bash script will:
- Check
$PATHfor$INSTALLDIR, then attempt to add it to.bashrcif missing.- Error from adding to
$PATHwhen not usingbashmay be bypassed if directory is in '$PATH' already.
- Error from adding to
- Use
curlto query for a filename from the download URL. - Use
curlto download file, thenchmodto set as executable using$PERMS. - Use
ln -sfrto create/update a link to$DOWNLOADDIRfrom$INSTALLDIR. pkill -f $STABLE_NAMEand$CANARY_NAMEprocesses, then relaunch via symlink if any were closed.
Known Bugs
- Stable crashes and hangs instead of properly handling a
SIGKILLas offluxer-stable-0.0.8-x86_64.AppImage, so we prefercanarybranch in the user configuration for now.
TODO
Non-extensive shopping list. We're frugal here though.
- Download and prepare AppImage with
lnwithout killing current running process.- Add flag to auto-restart process. (potentially replace
pkillwithpgrepto set flag first, thenpkillon flag)
- Add flag to auto-restart process. (potentially replace
- Opt-in flags for link creation or using link to launch process when done.
- Convert URL-encoding in filename string from
curl. - Better universal support.
- Add better error handling for adding to
$PATH. - Better error understanding and handling for for
curldownloads. - We like
.envfiles in this house.
Security concern:
Checking file that already exists in directory is simply a filename check. Potential to link and enable execution on such a file if it already exists there with the same name.
Friends, feel free to add ideas to this, make pull requests, or send me code snippets to learn from. Not expecting this to actually update otherwise.