| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # This script is intended to be sourced. | 6 # This script is intended to be sourced. |
| 7 # It scans your packages and adds the appropriate things to the environment. | 7 # It scans your packages and adds the appropriate things to the environment. |
| 8 | 8 |
| 9 export TOOLCHAIN=@TOOLCHAIN@ | 9 export TOOLCHAIN=@TOOLCHAIN@ |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 export RUBYLIB=${RUBYLIB}:${RUBYLIB}/${NACL_ARCH}-nacl | 49 export RUBYLIB=${RUBYLIB}:${RUBYLIB}/${NACL_ARCH}-nacl |
| 50 alias ruby='ruby /bin/irb' | 50 alias ruby='ruby /bin/irb' |
| 51 alias emacs='ENABLE_CONTROL_C=0 emacs' | 51 alias emacs='ENABLE_CONTROL_C=0 emacs' |
| 52 | 52 |
| 53 # Make vim emit directly until we have pipes. | 53 # Make vim emit directly until we have pipes. |
| 54 export PAGER=cat | 54 export PAGER=cat |
| 55 | 55 |
| 56 # Allow ctrl-c to work. | 56 # Allow ctrl-c to work. |
| 57 export ENABLE_CONTROL_C=1 | 57 export ENABLE_CONTROL_C=1 |
| 58 | 58 |
| 59 # TODO(bradnelson): Remove when we can install in a more normal location. |
| 60 # Usually this is in /etc/ssl/certs/, but we don't mount persistent storage |
| 61 # there yet. |
| 62 # Point git and curl at root certificates inside the curl package. |
| 63 export GIT_SSL_CAINFO=/mnt/html5/packages/curl.${NACL_ARCH}/ca-bundle.crt |
| 64 export CURL_CA_BUNDLE=/mnt/html5/packages/curl.${NACL_ARCH}/ca-bundle.crt |
| 65 |
| 59 # Scan through packages. | 66 # Scan through packages. |
| 60 for package_dir in /mnt/html5/packages/*; do | 67 for package_dir in /mnt/html5/packages/*; do |
| 61 # Find the name of the package. | 68 # Find the name of the package. |
| 62 package=${package_dir##*/} | 69 package=${package_dir##*/} |
| 63 package_root=${package%.*} | 70 package_root=${package%.*} |
| 64 # Figure out the main package dir. | 71 # Figure out the main package dir. |
| 65 if [ -d ${package_dir}/${package_root} ]; then | 72 if [ -d ${package_dir}/${package_root} ]; then |
| 66 package_inside=${package_dir}/${package_root} | 73 package_inside=${package_dir}/${package_root} |
| 67 else | 74 else |
| 68 package_inside=${package_dir} | 75 package_inside=${package_dir} |
| 69 fi | 76 fi |
| 70 | 77 |
| 71 # Add package to the path and library path. | 78 # Add package to the path and library path. |
| 72 export PATH=${PATH}:${package_inside} | 79 export PATH=${PATH}:${package_inside} |
| 73 package_libs=${package_inside}/${PACKAGE_LIB_DIR} | 80 package_libs=${package_inside}/${PACKAGE_LIB_DIR} |
| 74 if [ -d ${package_libs} ]; then | 81 if [ -d ${package_libs} ]; then |
| 75 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${package_libs} | 82 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${package_libs} |
| 76 fi | 83 fi |
| 77 # Add optional platform specific library path. | 84 # Add optional platform specific library path. |
| 78 package_libs=${package_inside}/${PACKAGE_ALT_LIB_DIR} | 85 package_libs=${package_inside}/${PACKAGE_ALT_LIB_DIR} |
| 79 if [ -d ${package_libs} ]; then | 86 if [ -d ${package_libs} ]; then |
| 80 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${package_libs} | 87 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${package_libs} |
| 81 fi | 88 fi |
| 82 done | 89 done |
| OLD | NEW |