summaryrefslogtreecommitdiff
path: root/installer_scripts/scripts/preinstall
diff options
context:
space:
mode:
authorrejbasket <39080670+rejbasket@users.noreply.github.com>2022-04-18 10:59:42 +0200
committerGitHub <noreply@github.com>2022-04-18 10:59:42 +0200
commit35b748c46c57e553b526ae4b106270f752b4acf3 (patch)
tree0fd872917bf26109b40b58edc8472d294c62f249 /installer_scripts/scripts/preinstall
parenta53d4aa229d31b1d261b99f39905eee8f37342d8 (diff)
Pkg inkscape check (#1622)
* add warning if Inkscape not installed (mac) enable local build with arm linux and mac Authored-by: rejbasket <rejbasket@users.noreply.github.com>
Diffstat (limited to 'installer_scripts/scripts/preinstall')
-rwxr-xr-xinstaller_scripts/scripts/preinstall24
1 files changed, 24 insertions, 0 deletions
diff --git a/installer_scripts/scripts/preinstall b/installer_scripts/scripts/preinstall
index 40187fb3..165128a7 100755
--- a/installer_scripts/scripts/preinstall
+++ b/installer_scripts/scripts/preinstall
@@ -1,6 +1,30 @@
#!/bin/bash
set -e
inkstitch_folder=($HOME/Library/Application\ Support/org.inkscape.Inkscape/config/inkscape/extensions/inkstitch)
+location_inkscape=(/Applications/Inkscape.app)
+
+# Checking if Inkscape is installed
+if [[ -d "${location_inkscape}" ]]; then
+ echo "Inkscape is found and installed "${location_Inkscape}"."
+else
+ osascript <<-AppleScript
+ set theDialogText to "Ink/Stich is an Inkscape plugin. Please install and run Inkscape before installing Ink/Stitch."
+ display dialog theDialogText buttons {"Okay"} default button "Okay"
+ AppleScript
+ exit 1
+fi
+
+# Checking if Inkscape configuration folders are created
+if [[ -d "${inkstitch_folder%config*}" ]]; then
+ echo "Inkscape configs are found and installed "${inkstitch_folder%config*}"."
+else
+ osascript <<-AppleScript
+ set theDialogText to "Please run Inkscape before installing Ink/Stitch."
+ display dialog theDialogText buttons {"Okay"} default button "Okay"
+ AppleScript
+ exit 1
+fi
+
if [[ -L "${inkstitch_folder}" ]]; then
unlink "${inkstitch_folder}"
echo "Unlinking manual install, to avoid damaging user local repository."