Skip to content

Commit

Permalink
install uninstall scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dbcm committed Jan 26, 2017
1 parent e8ec9e1 commit b2888d4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
26 changes: 26 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

set -xe

# install path
IPATH=~/.usbexec

# build dummy bin to remove the event
echo compile
xcodebuild -quiet -alltargets

# install dummy bin
echo cp YKD
mkdir -p $IPATH
cp build/Release/LaunchEventsPurger $IPATH/
cp commands $IPATH/

# install Event listener
echo cp LA
sed "s!__HOME__!$HOME!" org.profundos.usbexec.plist > ~/Library/LaunchAgents/org.profundos.usbexec.plist

# listen Events
echo load
launchctl load ~/Library/LaunchAgents/org.profundos.usbexec*.plist

echo DONE
17 changes: 17 additions & 0 deletions uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

#set -e

echo stop
launchctl stop org.profundos.usbexec

echo unload
launchctl unload $HOME/Library/LaunchAgents/org.profundos.usbexec*.plist

echo rm
rm $HOME/Library/LaunchAgents/org.profundos.usbexec*.plist

echo rm
rm -rf $HOME/usbexec

echo DONE

0 comments on commit b2888d4

Please sign in to comment.