-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'replace_appimagelauncher' into development
- Loading branch information
Showing
3 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
functions/universal/software/systemtools/f_go_appimaged.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# note: I split this up into different functions | ||
|
||
function remove_preexisting_similar_appimage_tools() { | ||
|
||
# if "true" exit code, service exists... aka "0" ... a false is "1" | ||
if appimaged_service_exists=$(sudo systemctl list-unit-files appimaged.service &>/dev/null) ; then | ||
fancy_message info "Existing appimaged service detected as active" | ||
fancy_message action "Removing pre-existing simliar AppImage related tools" | ||
fancy_message info "I think if pre-existing methods are NOT there ... this code may result in some error message" | ||
|
||
# Remove pre-existing similar tools | ||
sudo systemctl --user stop appimaged.service || true | ||
sudo apt-get -y remove appimagelauncher || true | ||
|
||
else | ||
fancy_message info "No Pre-existing appimage service detected" | ||
fi | ||
|
||
} | ||
|
||
function clearing_appimage_related_cache() { | ||
|
||
# Clear cache | ||
fancy_message action "Clearing AppImage related cache" | ||
|
||
rm "$HOME"/.local/share/applications/appimage* | ||
|
||
[ -f ~/.config/systemd/user/default.target.wants/appimagelauncherd.service ] && rm ~/.config/systemd/user/default.target.wants/appimagelauncherd.service | ||
} | ||
###################################################################################### | ||
|
||
# instructions below from: https://github.com/probonopd/go-appimage/tree/master/src/appimaged | ||
function download_and_setup_go_appimaged() { | ||
|
||
# create ~/Applications if its not already there | ||
[ ! -d "~/Applications" ] && fancy_message action "Creating ~/Applications" && mkdir -p ~/Applications | ||
|
||
# Download | ||
fancy_message action "Downloading Go-Appimaged AppImage" | ||
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimaged-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -P ~/Applications/ | ||
|
||
fancy_message action "Setting GoAppimaged Appimage to executable" | ||
chmod +x /home/$USER/Applications/appimaged-*.AppImage | ||
} | ||
|
||
# ref: https://github.com/probonopd/go-appimage/tree/master/src/appimaged | ||
function install_go_appimaged() { | ||
|
||
remove_preexisting_similar_appimage_tools | ||
clearing_appimage_related_cache | ||
|
||
# Optionally, install Firejail (if you want sandboxing functionality) | ||
|
||
download_and_setup_go_appimaged | ||
|
||
# Launch | ||
|
||
fancy_message action "Launching AppImaged AppImage" | ||
~/Applications/appimaged-*.AppImage | ||
} |