tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

js_wrapper.sh (735B)


      1 #! /bin/sh
      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/.
      5 
      6 # Wrapper for running SpiderMonkey js shell in automation with correct
      7 # LD_LIBRARY_PATH.
      8 
      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
     11 # from $0.
     12 topsrcdir=`cd \`dirname $0\`/../../..; pwd`
     13 
     14 JS_BINARY="$topsrcdir/jsshell/js"
     15 
     16 LD_LIBRARY_PATH="$topsrcdir/jsshell${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
     17 export LD_LIBRARY_PATH
     18 
     19 # Pass through all arguments and exit with status from js shell.
     20 exec "$JS_BINARY" "$@"