-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.sh
executable file
·26 lines (21 loc) · 669 Bytes
/
dev.sh
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
#!/bin/bash
set -xe
swift build
mkdir -p dev
cd dev
ln -sf ../alfred/* ./
ln -sf ../.build/x86_64-apple-macosx/debug/systemaudio .
prefs=~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist
syncfolder=$(/usr/libexec/PlistBuddy -c "print :syncfolder" $prefs 2>/dev/null || echo)
if [ -z "$syncfolder" ]; then
syncfolder=~/Library/Application\ Support/Alfred
fi
workflows=$syncfolder/Alfred.alfredpreferences/workflows
workflows=${workflows/\~/$HOME} # expand ~/
if [ -d "$workflows" ]; then
echo "symlinking $(pwd) into $workflows"
ln -sf "$(pwd)" "$workflows/systemaudio"
else
echo "Could not find workflows folder: $workflows"
exit 1
fi