-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.command
executable file
·39 lines (32 loc) · 1.23 KB
/
install.command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd "$DIR"
if [ -x "$(command -v convert)" ]; then
echo "ImageMagick Installed!"
else
echo "ImageMagick not found. Installing..."
DOWNLOAD_FILE="ImageMagick-x86_64-apple-darwin17.7.0.tar.gz"
rm "$DOWNLOAD_FILE" || echo "Cleaning.."
curl -O https://imagemagick.org/download/binaries/$DOWNLOAD_FILE
MAGICK_DIR_NAME=`tar -tzf $DOWNLOAD_FILE | head -1 | cut -f1 -d"/"`
tar xvzf $DOWNLOAD_FILE
INSTALL_DIR=$HOME/Library/ImageMagick
echo "IMAGE MAGICK DIR NAME: $MAGICK_DIR_NAME"
mkdir -p "$INSTALL_DIR"
cp -r $MAGICK_DIR_NAME/ $INSTALL_DIR/
echo "export PATH=\"$INSTALL_DIR/bin/:\$PATH\"" >> ~/.bash_profile
echo "Finished installing Libraries"
echo "Installing workflows"
sleep 3
fi
echo "Copying files to $HOME/Library/Services/"
mkdir -p $HOME/Library/Services/
ls $DIR/data/
cp -r data/* $HOME/Library/Services/ && echo "Workflows copied!" || (echo "no workflow found" && exit 1)
echo ">>>>:::::::::::::::"
echo "Workflows are ready to use"
echo "Please buy Snehil Bhushan a cup of coffee :)"
echo "To get started, right click on an Image file, click Services > [your desired command]"
echo "<<<<<:::::::::::::::"
echo "[Exit this window now]"
exit 1;