This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
manjaroConfiguration/installObsidian.sh

18 lines
519 B
Bash
Raw Normal View History

2021-11-14 00:44:24 +01:00
# Fetching last Obsidian version
2021-11-08 21:51:28 +01:00
wget -q https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest
echo "Retrieve the last package..."
2021-11-14 16:15:06 +01:00
grep 'browser_download_url": ".*.snap"' latest | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' > url
2021-11-08 21:51:28 +01:00
rm latest
2021-12-28 17:05:59 +01:00
2021-11-14 00:44:24 +01:00
# Downloading package
2021-11-08 21:51:28 +01:00
wget -q --show-progress -i url -O obsidian.snap
rm url
2021-12-28 17:05:59 +01:00
2021-11-14 00:44:24 +01:00
# Installing
2021-11-08 21:51:28 +01:00
sudo snap install --dangerous obsidian.snap
2021-12-28 17:05:59 +01:00
2021-11-14 00:44:24 +01:00
# Removing package
2021-11-08 21:51:28 +01:00
rm obsidian.snap
echo -e "\nObsidian installed or updated! 🎉"