From 564b9cd81602c537b507527e540f03cc8f8030b1 Mon Sep 17 00:00:00 2001 From: Quinta <112334784+Quinta0@users.noreply.github.com> Date: Sun, 9 Jun 2024 01:14:36 +0200 Subject: [PATCH] Update install_obsidian.sh --- install_obsidian.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/install_obsidian.sh b/install_obsidian.sh index aed7cad..10077ea 100644 --- a/install_obsidian.sh +++ b/install_obsidian.sh @@ -37,13 +37,20 @@ install_obsidian_windows() { choco install -y wget jq wget https://github.com/obsidianmd/obsidian-releases/releases/download/v1.6.3/Obsidian.1.6.3.exe -O ObsidianInstaller.exe - start /wait ObsidianInstaller.exe /S - # Check if Obsidian was installed and create a symbolic link for testing - if [ -f "/c/Program Files/Obsidian/Obsidian.exe" ]; then - ln -sf "/c/Program Files/Obsidian/Obsidian.exe" /usr/local/bin/obsidian + # Check if the installer was downloaded + if [ -f "ObsidianInstaller.exe" ]; then + start /wait ObsidianInstaller.exe /S + + # Check if Obsidian was installed and create a symbolic link for testing + if [ -f "/c/Program Files/Obsidian/Obsidian.exe" ]; then + ln -sf "/c/Program Files/Obsidian/Obsidian.exe" /usr/local/bin/obsidian + else + echo "Obsidian installation failed." + exit 1 + fi else - echo "Obsidian installation failed." + echo "Failed to download Obsidian installer." exit 1 fi }