File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# ##################
4- # PLUGINS DIRECTORY
4+ # DEFINITIONS
55# ##################
66
7+ service=' Xcode'
78plugins_dir=~ /Library/Developer/Xcode/Plug-ins/
89
9- if [ ! -d " $plugins_dir " ]; then
10- mkdir -p $plugins_dir
10+ # ##################
11+ # SHUT DOWN XCODE IF IT'S RUNNING
12+ # ##################
13+
14+ if pgrep -xq -- " ${service} " ; then
15+ echo " Xcode is running. Attempt to shut down? y/n"
16+ read answer
17+ if [ " $answer " = " y" ]; then
18+ echo " Shutting down Xcode"
19+ pkill -x $service
20+ else
21+ echo " Xcode needs to be closed"
22+ exit 1
23+ fi
24+ fi
25+
26+ # ##################
27+
28+ if [ -d " ${plugins_dir} Kotlin.ideplugin/" ]; then
29+ echo " Plugins directory and Kotlin plugin found. Deleting..."
30+ rm -rf $plugins_dir
31+ open -a $service
32+ pkill -x $service
1133fi
1234
35+ echo " Creating plugins directory"
36+ mkdir -p $plugins_dir
1337cp -r Kotlin.ideplugin $plugins_dir
1438
1539# ##################
2852 echo $lldb_config >> ~ /.lldbinit-Xcode
2953 echo $lldb_format >> ~ /.lldbinit-Xcode
3054fi
55+
You can’t perform that action at this time.
0 commit comments