1 parent 2e3b61b commit 47f4b78Copy full SHA for 47f4b78
1 file changed
support/install-helper.sh
@@ -1,16 +1,16 @@
1
#!/bin/bash
2
# Install the wtop privileged helper daemon.
3
-# Run with: sudo /Applications/wtop.app/Contents/Helpers/install-helper.sh
4
set -euo pipefail
5
6
if [ "$(id -u)" -ne 0 ]; then
7
echo "This script must be run with sudo."
8
exit 1
9
fi
10
11
-DIR="$(cd "$(dirname "$0")" && pwd)"
12
-HELPER_SRC="$DIR/wtop-helper"
13
-PLIST_SRC="$DIR/../Resources/me.abizer.wtop.helper.plist"
+# Resolve paths relative to the .app bundle
+BUNDLE="$(cd "$(dirname "$0")/.." && pwd)"
+HELPER_SRC="$BUNDLE/Helpers/wtop-helper"
+PLIST_SRC="$BUNDLE/Resources/me.abizer.wtop.helper.plist"
14
HELPER_DEST="/Library/PrivilegedHelperTools/me.abizer.wtop.helper"
15
PLIST_DEST="/Library/LaunchDaemons/me.abizer.wtop.helper.plist"
16
0 commit comments