-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |