From 497ac26bc605207e311f981cd9500239da39bcef Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 8 Nov 2021 21:51:28 +0100 Subject: [PATCH] Obsidian Script --- installObsidian.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 installObsidian.sh diff --git a/installObsidian.sh b/installObsidian.sh new file mode 100644 index 0000000..88fd89c --- /dev/null +++ b/installObsidian.sh @@ -0,0 +1,12 @@ +# On récupère la dernière version d'Obsidian +wget -q https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest +echo "Retrieve the last package..." +grep -n 'browser_download_url": ".*.snap"' latest | awk '{ print substr ($0, 36 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' > url +rm latest +# On télécharge le paquet +wget -q --show-progress -i url -O obsidian.snap +rm url +# On l'installe +sudo snap install --dangerous obsidian.snap +# On le supprime +rm obsidian.snap