2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 # Wrapper for running SpiderMonkey js shell in automation with correct
9 # We don't have a reference to topsrcdir at this point, but we are invoked as
10 # "$topsrcdir/mobile/android/config/js_wrapper.sh" so we can extract topsrcdir
12 topsrcdir
=`cd \`dirname $0\
`/../../..; pwd`
14 JS_BINARY
="$topsrcdir/jsshell/js"
16 LD_LIBRARY_PATH
="$topsrcdir/jsshell${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
17 export LD_LIBRARY_PATH
19 # Pass through all arguments and exit with status from js shell.
20 exec "$JS_BINARY" "$@"