root/trunk/llmozlib2/repackage_runtime_mac.sh

Revision 1, 2.0 kB (checked in by rob.linden, 2 years ago)

Initial checkin of 2007-11-01 snapshot

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/bin/bash
2
3 # This script adds or updates libllmozlib.dylib in mozilla-universal-darwin.tgz.
4 sandbox_location="$1"
5
6
7 if [ -f build/Release/libllmozlib.dylib ]; then
8         echo "libllmozlib.dylib found"
9 else
10         echo "libllmozlib.dylib not found, please build the Release target in llmozlib.xcodeproj"
11         exit 1
12 fi
13
14 if [ -d "$sandbox_location" ]; then
15         echo "Using sandbox at $sandbox_location"
16 else
17         echo "Sandbox $sandbox_location not found, exiting."
18         exit 1
19 fi
20
21
22 # exit on any error
23 set -e
24
25 echo "Unpacking mozilla-universal-darwin-original.tgz..."
26
27 # expand the runtime archive
28 rm -rf mozilla-universal-darwin
29 mkdir -p mozilla-universal-darwin
30 (cd mozilla-universal-darwin && tar -zxf ../mozilla-universal-darwin-original.tgz)
31
32 echo "Adding libllmozlib.dylib..."
33
34 # copy in the latest built version of llmozlib
35 cp ./build/Release/libllmozlib.dylib mozilla-universal-darwin
36
37 echo "Removing unneeded pieces..."
38
39 # remove bits of the mozilla runtime that we don't use
40 rm -rf mozilla-universal-darwin/Info.plist
41 rm -rf mozilla-universal-darwin/Resources
42 rm -rf mozilla-universal-darwin/run-mozilla.sh
43 rm -rf mozilla-universal-darwin/updater.app
44 rm -rf mozilla-universal-darwin/xpicleanup
45 rm -rf mozilla-universal-darwin/xulrunner
46 rm -rf mozilla-universal-darwin/xulrunner-bin
47
48 echo "Creating mozilla-universal-darwin.tgz..."
49
50 # tar up the runtime and llmozlib
51 rm -f ./mozilla-universal-darwin.tgz
52 tar -zcf ./mozilla-universal-darwin.tgz \
53         -C mozilla-universal-darwin .
54
55 #rm -rf mozilla-universal-darwin
56
57 #echo '###############################'
58 #echo 'please copy mozilla-universal-darwin.tgz to indra/newview in your sandbox.'
59
60 echo "Copying mozilla-universal-darwin.tgz to $sandbox_location/indra/newview..."
61 cp mozilla-universal-darwin.tgz $sandbox_location/indra/newview/
62
63 echo "Copying stub library to $sandbox_location/libraries/universal-darwin/..."
64 cp build/Release_stub/libllmozlib.dylib $sandbox_location/libraries/universal-darwin/lib_debug/libllmozlib.dylib
65 cp build/Release_stub/libllmozlib.dylib $sandbox_location/libraries/universal-darwin/lib_release/libllmozlib.dylib
66
67 echo "done!"
68
Note: See TracBrowser for help on using the browser.