-
Notifications
You must be signed in to change notification settings - Fork 14
/
copy-Pester.sh
executable file
·34 lines (29 loc) · 1.1 KB
/
copy-Pester.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
31
32
33
34
#!/bin/zsh -ef
set -x -v
PACKAGEDIR="$PWD"
PRODUCT="Pester"
# gather information
cd "$PACKAGEDIR"/Source
VERSION=`agvtool mvers -terse1`
BUILD=`agvtool vers -terse`
DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION"
DSTROOT="$PACKAGEDIR/$VOL"
SYMROOT="$PWD/build"
BUNDLEID=net.sabi.$PRODUCT
# for testing Sparkle - set the version back so it'll prompt an
# upgrade to the "current" version
BACKDATED=$DSTROOT/$PRODUCT' (backdated)'.app
/bin/rm -r $BACKDATED
/usr/bin/ditto $DSTROOT/$PRODUCT.app $BACKDATED
/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion 0' \
$BACKDATED/Contents/Info.plist
for host in mavericks yosemite elcapitan shirley; do
HOSTNAME=${host}.local
{ /usr/bin/ssh $HOSTNAME /usr/local/bin/appswitch -qi $BUNDLEID && \
/usr/bin/ssh $HOSTNAME /usr/local/bin/appswitch -qi $BUNDLEID } || \
/usr/bin/true
/usr/bin/rsync -a $DSTROOT $HOSTNAME:Downloads
/usr/bin/ssh $HOSTNAME defaults write $BUNDLEID SUFeedURL \
https://sabi.net/nriley/software/$PRODUCT/updatez.xml
/usr/bin/ssh $HOSTNAME /usr/local/bin/launch Downloads/${(q)VOL}
done