From 02ffe86a5183f6e033f9e4faa4c7f19b442dabd1 Mon Sep 17 00:00:00 2001 From: Alexandre LE GALL Date: Tue, 9 Feb 2021 11:07:56 +0100 Subject: [PATCH] Nouveau script --- update_opt_app.bash | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 update_opt_app.bash diff --git a/update_opt_app.bash b/update_opt_app.bash new file mode 100755 index 0000000..b663297 --- /dev/null +++ b/update_opt_app.bash @@ -0,0 +1,58 @@ +#!/bin/bash + +# Entrer dans le dossier /opt +cd /opt + +## KeepassXC +# Nom de l'application +app="keepassxc" + +# Télécharger +url="https://api.github.com/repos/keepassxreboot/keepassxc/releases/latest" +latest=$(curl -s $url | grep browser_download_url | awk -F '[""]' '{print $4}' | grep "$(uname -m)" | grep -e ".AppImage$") +sudo curl --location --output $app.AppImage $latest + +# Appliquer les droits +sudo chown root:sudo $app.AppImage && \ +sudo chmod g+x $app.AppImage + +# Créer le lanceur +if [[ ! -f "/usr/share/applications/${app}.desktop" ]]; then +sudo tee /usr/share/applications/${app}.desktop <