forked from mirror/daphne-emu
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmake_osx_update.sh
executable file
·66 lines (51 loc) · 1.75 KB
/
make_osx_update.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# check to make sure they've provided a path ..
if [ $# -ne "1" ]
then
echo "Usage: $0 <path to folder that 'DaphneLoader.app' lives in>"
exit 1
fi
UPDATEDIR=update_tmp_osx
TMPTAR=daphne_update_osx.tar.gz
APPDIR=$1
SRC_FILES=$APPDIR/"Daphne Loader.app/Contents/MacOS/Daphne.app/Contents/MacOS"
SRC_FRAMEWORKS=$APPDIR/"Daphne Loader.app/Contents/MacOS/Daphne.app/Contents/Frameworks"
DST_FRAMEWORKS=$UPDATEDIR/OSX_Frameworks
UPDATENAME=update_daphne.sh
VERSION=`bash print_version.sh "$SRC_FILES/DaphneManifest.xml"`
# Make sure their second argument points to the right place (we should find the file 'Daphne')
if [ ! -e "$SRC_FILES/Daphne" ]
then
echo "Are you sure that you specified the folder that 'DaphneLoader.app' _lives_ in?"
exit 1
fi
# remove all of the old schlop out of it
rm -rf $UPDATEDIR
# create updatedir folder
mkdir -p $UPDATEDIR
# create frameworks folder
mkdir -p $DST_FRAMEWORKS
# copy (and strip) daphne loader executable
cp "$SRC_FILES/Daphne" $UPDATEDIR/.
strip $UPDATEDIR/"Daphne"
# copy files that have changed since base release
cp "$SRC_FILES/daphne-changelog.txt" $UPDATEDIR/.
cp "$SRC_FILES/DaphneManifest.xml" $UPDATEDIR/.
# copy frameworks that have changed since base release
cp -R "$SRC_FRAMEWORKS/GLExtensionWrangler.framework" $DST_FRAMEWORKS
# archive up the update directory
cd $UPDATEDIR
tar cvfz ../$TMPTAR *
cd ..
# add update script to beginning
cat ../wx/frontend/update/updater_pfx.sh $TMPTAR > $UPDATENAME
ZIPNAME=daphne-updater-$VERSION-osx.zip
# create ZIP to be uploaded
zip $ZIPNAME $UPDATENAME
# upload it to server
# (this assumes the server has a matching username for your current username)
scp $ZIPNAME www.daphne-emu.com:/var/www/download/osx/.
# clean-up ...
rm $TMPTAR
rm -r $UPDATEDIR
rm $UPDATENAME