-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathupgrade.sh
executable file
·30 lines (25 loc) · 992 Bytes
/
upgrade.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
27
28
29
30
#!/usr/bin/env bash
# lol, hard-coded paths
cd "$(dirname "$0")"
for bin_path in *.app/Contents/MacOS/apache-callback-mac; do
mv "$bin_path" "$bin_path.old"
cp "$(ls $HOME/Library/Developer/Xcode/DerivedData/callback-mac-*/Build/Products/Debug/Callback.app/Contents/MacOS/Callback)" "$bin_path"
done
for bin_path in *.app/Contents/MacOS/apache-callback-mac.old; do
if [[ -f "${bin_path/\.old/}" ]]; then
rm "$bin_path"
else
mv "$bin_path" "${bin_path/\.old/}"
fi
done
for nib_path in *.app/Contents/Resources/English.lproj/MainMenu.nib; do
mv "$nib_path" "$nib_path.old"
cp "$(ls $HOME/Library/Developer/Xcode/DerivedData/callback-mac-*/Build/Products/Debug/Callback.app/Contents/Resources/English.lproj/MainMenu.nib)" "$nib_path"
done
for nib_path in *.app/Contents/Resources/English.lproj/MainMenu.nib.old; do
if [[ -f "${nib_path/\.old/}" ]]; then
rm "$nib_path"
else
mv "$nib_path" "${nib_path/\.old/}"
fi
done