3 Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment:
4 - croot: Changes directory to the top of the tree.
5 - m: Makes from the top of the tree.
6 - mm: Builds all of the modules in the current directory.
7 - mmm: Builds all of the modules in the supplied directories.
8 - cgrep: Greps on all local C/C++ files.
9 - jgrep: Greps on all local Java files.
10 - resgrep: Greps on all local res/*.xml files.
11 - godir: Go to the directory containing a file.
13 Look at the source to view more functions. The complete list is:
18 for i in `cat $T/build/envsetup.sh | sed -n "/^function /s/function \([a-z_]*\).*/\1/p" | sort`; do
24 # Get the value of a build variable as an absolute path.
25 function get_abs_build_var()
29 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
32 (cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
33 make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1)
36 # Get the exact value of a build variable.
37 function get_build_var()
41 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
44 CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
45 make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-$1
48 # check to see if the supplied product is one we can build
49 function check_product()
53 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
56 CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
58 TARGET_BUILD_VARIANT= \
61 get_build_var TARGET_DEVICE > /dev/null
62 # hide successful answers, but allow the errors to show
65 VARIANT_CHOICES=(user userdebug eng)
67 # check to see if the supplied variant is valid
68 function check_variant()
70 for v in ${VARIANT_CHOICES[@]}
84 echo "Couldn't locate the top of the tree. Try setting TOP."
88 ##################################################################
90 # Read me before you modify this code #
92 # This function sets ANDROID_BUILD_PATHS to what it is adding #
93 # to PATH, and the next time it is run, it removes that from #
94 # PATH. This is required so lunch can be run more than once #
95 # and still have working paths. #
97 ##################################################################
99 # Note: on windows/cygwin, ANDROID_BUILD_PATHS will contain spaces
100 # due to "C:\Program Files" being in the path.
103 if [ -n "$ANDROID_BUILD_PATHS" ] ; then
104 export PATH=${PATH/$ANDROID_BUILD_PATHS/}
106 if [ -n "$ANDROID_PRE_BUILD_PATHS" ] ; then
107 export PATH=${PATH/$ANDROID_PRE_BUILD_PATHS/}
108 # strip trailing ':', if any
109 export PATH=${PATH/%:/}
112 # and in with the new
114 prebuiltdir=$(getprebuilt)
116 # The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
117 export ANDROID_EABI_TOOLCHAIN=
118 toolchaindir=toolchain/arm-linux-androideabi-4.4.x/bin
119 if [ -d "$prebuiltdir/$toolchaindir" ]; then
120 export ANDROID_EABI_TOOLCHAIN=$prebuiltdir/$toolchaindir
123 export ARM_EABI_TOOLCHAIN=
124 toolchaindir=toolchain/arm-eabi-4.4.3/bin
125 if [ -d "$prebuiltdir/$toolchaindir" ]; then
126 export ARM_EABI_TOOLCHAIN=$prebuiltdir/$toolchaindir
129 export ANDROID_TOOLCHAIN=$ANDROID_EABI_TOOLCHAIN
130 export ANDROID_QTOOLS=$T/development/emulator/qtools
131 export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ARM_EABI_TOOLCHAIN$CODE_REVIEWS
132 export PATH=$PATH$ANDROID_BUILD_PATHS
134 unset ANDROID_JAVA_TOOLCHAIN
135 unset ANDROID_PRE_BUILD_PATHS
136 if [ -n "$JAVA_HOME" ]; then
137 export ANDROID_JAVA_TOOLCHAIN=$JAVA_HOME/bin
138 export ANDROID_PRE_BUILD_PATHS=$ANDROID_JAVA_TOOLCHAIN:
139 export PATH=$ANDROID_PRE_BUILD_PATHS$PATH
142 unset ANDROID_PRODUCT_OUT
143 export ANDROID_PRODUCT_OUT=$(get_abs_build_var PRODUCT_OUT)
144 export OUT=$ANDROID_PRODUCT_OUT
146 unset ANDROID_HOST_OUT
147 export ANDROID_HOST_OUT=$(get_abs_build_var HOST_OUT)
149 # needed for building linux on MacOS
151 #export HOST_EXTRACFLAGS="-I "$T/system/kernel_headers/host_include
154 function printconfig()
158 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
161 get_build_var report_config
164 function set_stuff_for_environment()
171 export ANDROID_BUILD_TOP=$(gettop)
174 function set_sequence_number()
176 export BUILD_ENV_SEQUENCE_NUMBER=10
181 if [ "$STAY_OFF_MY_LAWN" = "" ]; then
182 local product=$TARGET_PRODUCT
183 local variant=$TARGET_BUILD_VARIANT
184 local apps=$TARGET_BUILD_APPS
185 if [ -z "$apps" ]; then
186 export PROMPT_COMMAND="echo -ne \"\033]0;[${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
188 export PROMPT_COMMAND="echo -ne \"\033]0;[$apps $variant] ${USER}@${HOSTNAME}: ${PWD}\007\""
193 function addcompletions()
197 # Keep us from trying to run in something that isn't bash.
198 if [ -z "${BASH_VERSION}" ]; then
202 # Keep us from trying to run in bash that's too old.
203 if [ ${BASH_VERSINFO[0]} -lt 3 ]; then
207 dir="sdk/bash_completion"
208 if [ -d ${dir} ]; then
209 for f in `/bin/ls ${dir}/[a-z]*.bash 2> /dev/null`; do
216 function choosetype()
218 echo "Build type choices are:"
223 local DEFAULT_NUM DEFAULT_VALUE
225 DEFAULT_VALUE=release
227 export TARGET_BUILD_TYPE=
229 while [ -z $TARGET_BUILD_TYPE ]
231 echo -n "Which would you like? ["$DEFAULT_NUM"] "
232 if [ -z "$1" ] ; then
240 export TARGET_BUILD_TYPE=$DEFAULT_VALUE
243 export TARGET_BUILD_TYPE=release
246 export TARGET_BUILD_TYPE=release
249 export TARGET_BUILD_TYPE=debug
252 export TARGET_BUILD_TYPE=debug
256 echo "I didn't understand your response. Please try again."
260 if [ -n "$1" ] ; then
265 set_stuff_for_environment
269 # This function isn't really right: It chooses a TARGET_PRODUCT
270 # based on the list of boards. Usually, that gets you something
271 # that kinda works with a generic product, but really, you should
272 # pick a product by name.
274 function chooseproduct()
276 if [ "x$TARGET_PRODUCT" != x ] ; then
277 default_value=$TARGET_PRODUCT
282 export TARGET_PRODUCT=
284 while [ -z "$TARGET_PRODUCT" ]
286 echo -n "Which product would you like? [$default_value] "
287 if [ -z "$1" ] ; then
294 if [ -z "$ANSWER" ] ; then
295 export TARGET_PRODUCT=$default_value
297 if check_product $ANSWER
299 export TARGET_PRODUCT=$ANSWER
301 echo "** Not a valid product: $ANSWER"
304 if [ -n "$1" ] ; then
309 set_stuff_for_environment
312 function choosevariant()
314 echo "Variant choices are:"
317 for v in ${VARIANT_CHOICES[@]}
319 # The product name is the name of the directory containing
320 # the makefile we found, above.
325 local default_value=eng
328 export TARGET_BUILD_VARIANT=
329 while [ -z "$TARGET_BUILD_VARIANT" ]
331 echo -n "Which would you like? [$default_value] "
332 if [ -z "$1" ] ; then
339 if [ -z "$ANSWER" ] ; then
340 export TARGET_BUILD_VARIANT=$default_value
341 elif (echo -n $ANSWER | grep -q -e "^[0-9][0-9]*$") ; then
342 if [ "$ANSWER" -le "${#VARIANT_CHOICES[@]}" ] ; then
343 export TARGET_BUILD_VARIANT=${VARIANT_CHOICES[$(($ANSWER-1))]}
346 if check_variant $ANSWER
348 export TARGET_BUILD_VARIANT=$ANSWER
350 echo "** Not a valid variant: $ANSWER"
353 if [ -n "$1" ] ; then
359 function choosecombo()
372 set_stuff_for_environment
376 # Clear this variable. It will be built up again when the vendorsetup.sh
377 # files are included at the end of this file.
378 unset LUNCH_MENU_CHOICES
379 function add_lunch_combo()
383 for c in ${LUNCH_MENU_CHOICES[@]} ; do
384 if [ "$new_combo" = "$c" ] ; then
388 LUNCH_MENU_CHOICES=(${LUNCH_MENU_CHOICES[@]} $new_combo)
391 # add the default one here
392 add_lunch_combo full-eng
393 add_lunch_combo generic_x86-eng
394 add_lunch_combo vbox_x86-eng
396 function print_lunch_menu()
400 echo "You're building on" $uname
402 echo "Lunch menu... pick a combo:"
406 for choice in ${LUNCH_MENU_CHOICES[@]}
423 echo -n "Which would you like? [full-eng] "
432 elif (echo -n $answer | grep -q -e "^[0-9][0-9]*$")
434 if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ]
436 selection=${LUNCH_MENU_CHOICES[$(($answer-1))]}
438 elif (echo -n $answer | grep -q -e "^[^\-][^\-]*-[^\-][^\-]*$")
443 if [ -z "$selection" ]
446 echo "Invalid lunch combo: $answer"
450 export TARGET_BUILD_APPS=
452 local product=$(echo -n $selection | sed -e "s/-.*$//")
453 check_product $product
457 echo "** Don't have a product spec for: '$product'"
458 echo "** Do you have the right repo manifest?"
462 local variant=$(echo -n $selection | sed -e "s/^[^\-]*-//")
463 check_variant $variant
467 echo "** Invalid variant: '$variant'"
468 echo "** Must be one of ${VARIANT_CHOICES[@]}"
472 if [ -z "$product" -o -z "$variant" ]
478 export TARGET_PRODUCT=$product
479 export TARGET_BUILD_VARIANT=$variant
480 export TARGET_BUILD_TYPE=release
484 set_stuff_for_environment
488 # Tab completion for lunch.
493 cur="${COMP_WORDS[COMP_CWORD]}"
494 prev="${COMP_WORDS[COMP_CWORD-1]}"
496 COMPREPLY=( $(compgen -W "${LUNCH_MENU_CHOICES[*]}" -- ${cur}) )
499 complete -F _lunch lunch
501 # Configures the build to build unbundled apps.
502 # Run tapas with one ore more app names (from LOCAL_PACKAGE_NAME)
505 local variant=$(echo -n $(echo $* | xargs -n 1 echo | grep -E '^(user|userdebug|eng)$'))
506 local apps=$(echo -n $(echo $* | xargs -n 1 echo | grep -E -v '^(user|userdebug|eng)$'))
508 if [ $(echo $variant | wc -w) -gt 1 ]; then
509 echo "tapas: Error: Multiple build variants supplied: $variant"
512 if [ -z "$variant" ]; then
515 if [ -z "$apps" ]; then
519 export TARGET_PRODUCT=full
520 export TARGET_BUILD_VARIANT=$variant
521 export TARGET_BUILD_TYPE=release
522 export TARGET_BUILD_APPS=$apps
524 set_stuff_for_environment
530 local TOPFILE=build/core/envsetup.mk
531 if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ] ; then
534 if [ -f $TOPFILE ] ; then
535 # The following circumlocution (repeated below as well) ensures
536 # that we record the true directory name and not one that is
537 # faked up with symlink names.
540 # We redirect cd to /dev/null in case it's aliased to
541 # a command that prints something as a side-effect
545 while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
550 if [ -f "$T/$TOPFILE" ]; then
563 echo "Couldn't locate the top of the tree. Try setting TOP."
567 function findmakefile()
569 TOPFILE=build/core/envsetup.mk
570 # We redirect cd to /dev/null in case it's aliased to
571 # a command that prints something as a side-effect
575 while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
577 if [ -f "$T/Android.mk" ]; then
589 # If we're sitting in the root of the build tree, just do a
591 if [ -f build/core/envsetup.mk -a -f Makefile ]; then
594 # Find the closest Android.mk file.
596 local M=$(findmakefile)
597 # Remove the path to top as the makefilepath needs to be relative
598 local M=`echo $M|sed 's:'$T'/::'`
600 echo "Couldn't locate the top of the tree. Try setting TOP."
601 elif [ ! "$M" ]; then
602 echo "Couldn't locate a makefile from the current directory."
604 ONE_SHOT_MAKEFILE=$M make -C $T all_modules $@
616 local DASH_ARGS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^-.*$/')
617 local DIRS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^[^-].*$/')
618 for DIR in $DIRS ; do
619 DIR=`echo $DIR | sed -e 's:/$::'`
620 if [ -f $DIR/Android.mk ]; then
621 TO_CHOP=`(cd -P -- $T && pwd -P) | wc -c | tr -d ' '`
622 TO_CHOP=`expr $TO_CHOP + 1`
623 START=`PWD= /bin/pwd`
624 MFILE=`echo $START | cut -c${TO_CHOP}-`
625 if [ "$MFILE" = "" ] ; then
626 MFILE=$DIR/Android.mk
628 MFILE=$MFILE/$DIR/Android.mk
630 MAKEFILE="$MAKEFILE $MFILE"
632 if [ "$DIR" = snod ]; then
634 elif [ "$DIR" = showcommands ]; then
635 ARGS="$ARGS showcommands"
636 elif [ "$DIR" = dist ]; then
638 elif [ "$DIR" = incrementaljavac ]; then
639 ARGS="$ARGS incrementaljavac"
641 echo "No Android.mk in $DIR."
646 ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T $DASH_ARGS all_modules $ARGS
648 echo "Couldn't locate the top of the tree. Try setting TOP."
658 echo "Couldn't locate the top of the tree. Try setting TOP."
664 TOPFILE=build/core/envsetup.mk
665 # We redirect cd to /dev/null in case it's aliased to
666 # a command that prints something as a side-effect
670 while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
672 if [ -f "$T/Android.mk" ]; then
679 echo "can't find Android.mk"
686 local PID=`adb shell ps | fgrep $1 | sed -e 's/[^ ]* *\([0-9]*\).*/\1/'`
689 echo "usage: pid name"
693 # systemstack - dump the current stack trace of all threads in the system process
694 # to the usual ANR traces file
695 function systemstack()
697 adb shell echo '""' '>>' /data/anr/traces.txt && adb shell chmod 776 /data/anr/traces.txt && adb shell kill -3 $(pid system_server)
702 local OUT_ROOT=$(get_abs_build_var PRODUCT_OUT)
703 local OUT_SYMBOLS=$(get_abs_build_var TARGET_OUT_UNSTRIPPED)
704 local OUT_SO_SYMBOLS=$(get_abs_build_var TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)
705 local OUT_EXE_SYMBOLS=$(get_abs_build_var TARGET_OUT_EXECUTABLES_UNSTRIPPED)
706 local PREBUILTS=$(get_abs_build_var ANDROID_PREBUILTS)
707 if [ "$OUT_ROOT" -a "$PREBUILTS" ]; then
716 if [ "$PORT" ] ; then
724 if [ "$PROG" ] ; then
725 if [[ "$PROG" =~ ^[0-9]+$ ]] ; then
730 adb forward "tcp$PORT" "tcp$PORT"
731 adb shell gdbserver $PORT --attach $PID &
735 echo "If you haven't done so already, do this first on the device:"
736 echo " gdbserver $PORT /system/bin/$EXE"
738 echo " gdbserver $PORT --attach $PID"
742 echo >|"$OUT_ROOT/gdbclient.cmds" "set solib-absolute-prefix $OUT_SYMBOLS"
743 echo >>"$OUT_ROOT/gdbclient.cmds" "set solib-search-path $OUT_SO_SYMBOLS"
744 echo >>"$OUT_ROOT/gdbclient.cmds" "target remote $PORT"
745 echo >>"$OUT_ROOT/gdbclient.cmds" ""
747 arm-linux-androideabi-gdb -x "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
749 echo "Unable to determine build system output dir."
758 find -E . -name .repo -prune -o -name .git -prune -o -type f -iregex '.*\.(c|h|cpp|S|java|xml|sh|mk)' -print0 | xargs -0 grep --color -n "$@"
765 find . -name .repo -prune -o -name .git -prune -o -type f -iregex '.*\.\(c\|h\|cpp\|S\|java\|xml\|sh\|mk\)' -print0 | xargs -0 grep --color -n "$@"
772 find . -name .repo -prune -o -name .git -prune -o -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
777 find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' \) -print0 | xargs -0 grep --color -n "$@"
782 for dir in `find . -name .repo -prune -o -name .git -prune -o -name res -type d`; do find $dir -type f -name '*\.xml' -print0 | xargs -0 grep --color -n "$@"; done;
789 find -E . -name .repo -prune -o -name .git -prune -o -type f -iregex '.*/(Makefile|Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -print0 | xargs -0 grep --color -n "$@"
794 find -E . -name .repo -prune -o -name .git -prune -o -type f -iregex '.*\.(c|h|cpp|S|java|xml)' -print0 | xargs -0 grep --color -n -i "$@"
801 find . -name .repo -prune -o -name .git -prune -o -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -type f -print0 | xargs -0 grep --color -n "$@"
806 find . -name .repo -prune -o -name .git -prune -o -regextype posix-egrep -iregex '.*\.(c|h|cpp|S|java|xml)' -type f -print0 | xargs -0 grep --color -n -i "$@"
814 get_abs_build_var ANDROID_PREBUILTS
817 function tracedmdump()
821 echo "Couldn't locate the top of the tree. Try setting TOP."
824 local prebuiltdir=$(getprebuilt)
825 local KERNEL=$T/prebuilt/android-arm/kernel/vmlinux-qemu
828 if [ ! "$TRACE" ] ; then
829 echo "usage: tracedmdump tracename"
833 if [ ! -r "$KERNEL" ] ; then
834 echo "Error: cannot find kernel: '$KERNEL'"
838 local BASETRACE=$(basename $TRACE)
839 if [ "$BASETRACE" = "$TRACE" ] ; then
840 TRACE=$ANDROID_PRODUCT_OUT/traces/$TRACE
843 echo "post-processing traces..."
844 rm -f $TRACE/qtrace.dexlist
846 if [ $? -ne 0 ]; then
848 echo "*** Error: malformed trace. Did you remember to exit the emulator?"
852 echo "generating dexlist output..."
853 /bin/ls $ANDROID_PRODUCT_OUT/system/framework/*.jar $ANDROID_PRODUCT_OUT/system/app/*.apk $ANDROID_PRODUCT_OUT/data/app/*.apk 2>/dev/null | xargs dexlist > $TRACE/qtrace.dexlist
854 echo "generating dmtrace data..."
855 q2dm -r $ANDROID_PRODUCT_OUT/symbols $TRACE $KERNEL $TRACE/dmtrace || return
856 echo "generating html file..."
857 dmtracedump -h $TRACE/dmtrace >| $TRACE/dmtrace.html || return
858 echo "done, see $TRACE/dmtrace.html for details"
860 echo " traceview $TRACE/dmtrace"
863 # communicate with a running device or emulator, set up necessary state,
864 # and run the hat command.
867 # process standard adb options
869 if [ "$1" = "-d" -o "$1" = "-e" ]; then
872 elif [ "$1" = "-s" ]; then
876 local adbOptions=${adbTarget}
877 echo adbOptions = ${adbOptions}
882 if [ "$targetPid" = "" ]; then
883 echo "Usage: runhat [ -d | -e | -s serial ] target-pid"
887 # confirm hat is available
888 if [ -z $(which hat) ]; then
889 echo "hat is not available in this configuration."
893 # issue "am" command to cause the hprof dump
894 local devFile=/sdcard/hprof-$targetPid
895 echo "Poking $targetPid and waiting for data..."
896 adb ${adbOptions} shell am dumpheap $targetPid $devFile
897 echo "Press enter when logcat shows \"hprof: heap dump completed\""
901 local localFile=/tmp/$$-hprof
903 echo "Retrieving file $devFile..."
904 adb ${adbOptions} pull $devFile $localFile
906 adb ${adbOptions} shell rm $devFile
908 echo "Running hat on $localFile"
909 echo "View the output by pointing your browser at http://localhost:7000/"
914 function getbugreports()
916 local reports=(`adb shell ls /sdcard/bugreports | tr -d '\r'`)
918 if [ ! "$reports" ]; then
919 echo "Could not locate any bugreports."
924 for report in ${reports[@]}
926 echo "/sdcard/bugreports/${report}"
927 adb pull /sdcard/bugreports/${report} ${report}
932 function startviewserver()
935 if [ $# -gt 0 ]; then
938 adb shell service call window 1 i32 $port
941 function stopviewserver()
943 adb shell service call window 2
946 function isviewserverstarted()
948 adb shell service call window 3
953 adb shell input keyevent 3
958 adb shell input keyevent 4
963 adb shell input keyevent 82
968 if [ ! "$ANDROID_PRODUCT_OUT" ]; then
969 echo "Couldn't locate output files. Try running 'lunch' first." >&2
974 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
978 (cd "$T" && mmm tests/SmokeTest) &&
979 adb uninstall com.android.smoketest > /dev/null &&
980 adb uninstall com.android.smoketest.tests > /dev/null &&
981 adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTestApp.apk &&
982 adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTest.apk &&
983 adb shell am instrument -w com.android.smoketest.tests/android.test.InstrumentationTestRunner
986 # simple shortcut to the runtest command
991 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
994 ("$T"/development/testrunner/runtest.py $@)
998 if [[ -z "$1" ]]; then
999 echo "Usage: godir <regex>"
1003 if [[ ! -f $T/filelist ]]; then
1004 echo -n "Creating index..."
1005 (cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist)
1010 lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq))
1011 if [[ ${#lines[@]} = 0 ]]; then
1017 if [[ ${#lines[@]} > 1 ]]; then
1018 while [[ -z "$pathname" ]]; do
1021 for line in ${lines[@]}; do
1022 printf "%6s %s\n" "[$index]" $line
1023 index=$(($index + 1))
1026 echo -n "Select one: "
1029 if [[ $choice -gt ${#lines[@]} || $choice -lt 1 ]]; then
1030 echo "Invalid choice"
1033 pathname=${lines[$(($choice-1))]}
1036 pathname=${lines[0]}
1041 # Force JAVA_HOME to point to java 1.6 if it isn't already set
1042 function set_java_home() {
1043 if [ ! "$JAVA_HOME" ]; then
1046 export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
1049 export JAVA_HOME=/usr/lib/jvm/java-6-sun
1055 if [ "x$SHELL" != "x/bin/bash" ]; then
1056 case `ps -o command -p $$` in
1060 echo "WARNING: Only bash is supported, use of other shell would lead to erroneous results"
1065 # Execute the contents of any vendorsetup.sh files we can find.
1066 for f in `/bin/ls vendor/*/vendorsetup.sh vendor/*/*/vendorsetup.sh device/*/*/vendorsetup.sh 2> /dev/null`