You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

#!/bin/bash
OBSIDIAN_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
obsidianSource="https://github.com/obsidianmd/obsidian-releases/releases/download/v1.1.9/Obsidian-1.1.9.AppImage"
obsidianInstallDir="/home/$USER/obsidian"
obsidianRep="https://git.keydev.me/kerem/infoVault"
install_obsidian()
{
graphics_install_prompt "Obsidian Will be installed"
graphics_install_prompt "Source : $obsidianSource"
cd $OBSIDIAN_SCRIPT_DIR
wget $obsidianSource
obsidianExecutable=$(ls | grep -oP '.*AppImage')
chmod ug+x $obsidianExecutable
if [[ -d "$obsidianInstallDir" ]]
then
graphics_comment "Obsidian Already Exists only the app will be changed"
else
graphics_comment "Obsidian Directory Will Be Created"
mkdir -p $obsidianInstallDir
fi
cp $obsidianExecutable $obsidianInstallDir/obsidian.AppImage
rm $OBSIDIAN_SCRIPT_DIR/$obsidianExecutable
cd $obsidianInstallDir
graphics_comment "Markdown repertoire : $obsidianRep"
git clone $obsidianRep
if [[ -d "$obsidianInstallDir/infoVault" ]]
then
graphics_comment "Info Vault already here not replacing. don't forget update the git"
fi
graphics_install_prompt "Obsidian installation complete"
cd $MAIN_DIR
}