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 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 \
57 TARGET_PRODUCT=$1 TARGET_BUILD_VARIANT= \
58 TARGET_SIMULATOR= TARGET_BUILD_TYPE= \
60 get_build_var TARGET_DEVICE > /dev/null
61 # hide successful answers, but allow the errors to show
64 VARIANT_CHOICES=(user userdebug eng)
66 # check to see if the supplied variant is valid
67 function check_variant()
69 for v in ${VARIANT_CHOICES[@]}
83 echo "Couldn't locate the top of the tree. Try setting TOP."
87 ##################################################################
89 # Read me before you modify this code #
91 # This function sets ANDROID_BUILD_PATHS to what it is adding #
92 # to PATH, and the next time it is run, it removes that from #
93 # PATH. This is required so lunch can be run more than once #
94 # and still have working paths. #
96 ##################################################################
99 if [ -n $ANDROID_BUILD_PATHS ] ; then
100 export PATH=${PATH/$ANDROID_BUILD_PATHS/}
102 if [ -n $ANDROID_PRE_BUILD_PATHS ] ; then
103 export PATH=${PATH/$ANDROID_PRE_BUILD_PATHS/}
106 # and in with the new
108 prebuiltdir=$(getprebuilt)
109 export ANDROID_EABI_TOOLCHAIN=$prebuiltdir/toolchain/arm-eabi-4.4.3/bin
110 export ANDROID_TOOLCHAIN=$ANDROID_EABI_TOOLCHAIN
111 export ANDROID_QTOOLS=$T/development/emulator/qtools
112 export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ANDROID_EABI_TOOLCHAIN$CODE_REVIEWS
113 export PATH=$PATH$ANDROID_BUILD_PATHS
115 unset ANDROID_JAVA_TOOLCHAIN
116 if [ -n "$JAVA_HOME" ]; then
117 export ANDROID_JAVA_TOOLCHAIN=$JAVA_HOME/bin
119 export ANDROID_PRE_BUILD_PATHS=$ANDROID_JAVA_TOOLCHAIN
120 if [ -n "$ANDROID_PRE_BUILD_PATHS" ]; then
121 export PATH=$ANDROID_PRE_BUILD_PATHS:$PATH
124 unset ANDROID_PRODUCT_OUT
125 export ANDROID_PRODUCT_OUT=$(get_abs_build_var PRODUCT_OUT)
126 export OUT=$ANDROID_PRODUCT_OUT
128 # needed for building linux on MacOS
130 #export HOST_EXTRACFLAGS="-I "$T/system/kernel_headers/host_include
132 # needed for OProfile to post-process collected samples
133 export OPROFILE_EVENTS_DIR=$prebuiltdir/oprofile
136 function printconfig()
140 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
143 get_build_var report_config
146 function set_stuff_for_environment()
153 export ANDROID_BUILD_TOP=$(gettop)
156 function set_sequence_number()
158 export BUILD_ENV_SEQUENCE_NUMBER=10
163 if [ "$STAY_OFF_MY_LAWN" = "" ]; then
164 local product=$TARGET_PRODUCT
165 local variant=$TARGET_BUILD_VARIANT
166 local apps=$TARGET_BUILD_APPS
167 if [ -z "$apps" ]; then
168 export PROMPT_COMMAND="echo -ne \"\033]0;[${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
170 export PROMPT_COMMAND="echo -ne \"\033]0;[$apps $variant] ${USER}@${HOSTNAME}: ${PWD}\007\""
179 echo "Build for the simulator or the device?"
184 export TARGET_SIMULATOR=
186 while [ -z $TARGET_SIMULATOR ]
188 echo -n "Which would you like? [1] "
189 if [ -z "$1" ] ; then
197 export TARGET_SIMULATOR=false
200 export TARGET_SIMULATOR=false
203 export TARGET_SIMULATOR=false
206 export TARGET_SIMULATOR=true
209 export TARGET_SIMULATOR=true
213 echo "I didn't understand your response. Please try again."
217 if [ -n "$1" ] ; then
222 set_stuff_for_environment
228 echo "Only device builds are supported for" `uname -s`
229 echo " Forcing TARGET_SIMULATOR=false"
233 echo -n "Press enter: "
237 export TARGET_SIMULATOR=false
238 set_stuff_for_environment
243 function choosetype()
245 echo "Build type choices are:"
250 local DEFAULT_NUM DEFAULT_VALUE
251 if [ $TARGET_SIMULATOR = "false" ] ; then
253 DEFAULT_VALUE=release
259 export TARGET_BUILD_TYPE=
261 while [ -z $TARGET_BUILD_TYPE ]
263 echo -n "Which would you like? ["$DEFAULT_NUM"] "
264 if [ -z "$1" ] ; then
272 export TARGET_BUILD_TYPE=$DEFAULT_VALUE
275 export TARGET_BUILD_TYPE=release
278 export TARGET_BUILD_TYPE=release
281 export TARGET_BUILD_TYPE=debug
284 export TARGET_BUILD_TYPE=debug
288 echo "I didn't understand your response. Please try again."
292 if [ -n "$1" ] ; then
297 set_stuff_for_environment
301 # This function isn't really right: It chooses a TARGET_PRODUCT
302 # based on the list of boards. Usually, that gets you something
303 # that kinda works with a generic product, but really, you should
304 # pick a product by name.
306 function chooseproduct()
308 if [ "x$TARGET_PRODUCT" != x ] ; then
309 default_value=$TARGET_PRODUCT
311 if [ "$TARGET_SIMULATOR" = true ] ; then
314 default_value=generic
318 export TARGET_PRODUCT=
320 while [ -z "$TARGET_PRODUCT" ]
322 echo -n "Which product would you like? [$default_value] "
323 if [ -z "$1" ] ; then
330 if [ -z "$ANSWER" ] ; then
331 export TARGET_PRODUCT=$default_value
333 if check_product $ANSWER
335 export TARGET_PRODUCT=$ANSWER
337 echo "** Not a valid product: $ANSWER"
340 if [ -n "$1" ] ; then
345 set_stuff_for_environment
348 function choosevariant()
350 echo "Variant choices are:"
353 for v in ${VARIANT_CHOICES[@]}
355 # The product name is the name of the directory containing
356 # the makefile we found, above.
361 local default_value=eng
364 export TARGET_BUILD_VARIANT=
365 while [ -z "$TARGET_BUILD_VARIANT" ]
367 echo -n "Which would you like? [$default_value] "
368 if [ -z "$1" ] ; then
375 if [ -z "$ANSWER" ] ; then
376 export TARGET_BUILD_VARIANT=$default_value
377 elif (echo -n $ANSWER | grep -q -e "^[0-9][0-9]*$") ; then
378 if [ "$ANSWER" -le "${#VARIANT_CHOICES[@]}" ] ; then
379 export TARGET_BUILD_VARIANT=${VARIANT_CHOICES[$(($ANSWER-$_arrayoffset))]}
382 if check_variant $ANSWER
384 export TARGET_BUILD_VARIANT=$ANSWER
386 echo "** Not a valid variant: $ANSWER"
389 if [ -n "$1" ] ; then
395 function choosecombo()
412 set_stuff_for_environment
416 # Clear this variable. It will be built up again when the vendorsetup.sh
417 # files are included at the end of this file.
418 unset LUNCH_MENU_CHOICES
419 function add_lunch_combo()
423 for c in ${LUNCH_MENU_CHOICES[@]} ; do
424 if [ "$new_combo" = "$c" ] ; then
428 LUNCH_MENU_CHOICES=(${LUNCH_MENU_CHOICES[@]} $new_combo)
431 # add the default one here
432 add_lunch_combo generic-eng
434 # if we're on linux, add the simulator. There is a special case
435 # in lunch to deal with the simulator
436 if [ "$(uname)" = "Linux" ] ; then
437 add_lunch_combo simulator
440 function print_lunch_menu()
444 echo "You're building on" $uname
446 echo "Lunch menu... pick a combo:"
450 for choice in ${LUNCH_MENU_CHOICES[@]}
467 echo -n "Which would you like? [generic-eng] "
475 selection=generic-eng
476 elif [ "$answer" = "simulator" ]
479 elif (echo -n $answer | grep -q -e "^[0-9][0-9]*$")
481 if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ]
483 selection=${LUNCH_MENU_CHOICES[$(($answer-$_arrayoffset))]}
485 elif (echo -n $answer | grep -q -e "^[^\-][^\-]*-[^\-][^\-]*$")
490 if [ -z "$selection" ]
493 echo "Invalid lunch combo: $answer"
497 export TARGET_BUILD_APPS=
499 # special case the simulator
500 if [ "$selection" = "simulator" ]
502 export TARGET_PRODUCT=sim
503 export TARGET_BUILD_VARIANT=eng
504 export TARGET_SIMULATOR=true
505 export TARGET_BUILD_TYPE=debug
507 local product=$(echo -n $selection | sed -e "s/-.*$//")
508 check_product $product
512 echo "** Don't have a product spec for: '$product'"
513 echo "** Do you have the right repo manifest?"
517 local variant=$(echo -n $selection | sed -e "s/^[^\-]*-//")
518 check_variant $variant
522 echo "** Invalid variant: '$variant'"
523 echo "** Must be one of ${VARIANT_CHOICES[@]}"
527 if [ -z "$product" -o -z "$variant" ]
533 export TARGET_PRODUCT=$product
534 export TARGET_BUILD_VARIANT=$variant
535 export TARGET_SIMULATOR=false
536 export TARGET_BUILD_TYPE=release
541 set_stuff_for_environment
545 # Configures the build to build unbundled apps.
546 # Run tapas with one ore more app names (from LOCAL_PACKAGE_NAME)
549 local variant=$(echo -n $(echo $* | xargs -n 1 echo | grep -E '^(user|userdebug|eng)$'))
550 local apps=$(echo -n $(echo $* | xargs -n 1 echo | grep -E -v '^(user|userdebug|eng)$'))
552 if [ $(echo $variant | wc -w) -gt 1 ]; then
553 echo "tapas: Error: Multiple build variants supplied: $variant"
556 if [ -z "$variant" ]; then
559 if [ -z "$apps" ]; then
563 export TARGET_PRODUCT=generic
564 export TARGET_BUILD_VARIANT=$variant
565 export TARGET_SIMULATOR=false
566 export TARGET_BUILD_TYPE=release
567 export TARGET_BUILD_APPS=$apps
569 set_stuff_for_environment
575 local TOPFILE=build/core/envsetup.mk
576 if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ] ; then
579 if [ -f $TOPFILE ] ; then
580 # The following circumlocution (repeated below as well) ensures
581 # that we record the true directory name and not one that is
582 # faked up with symlink names.
585 # We redirect cd to /dev/null in case it's aliased to
586 # a command that prints something as a side-effect
590 while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
595 if [ -f "$T/$TOPFILE" ]; then
608 echo "Couldn't locate the top of the tree. Try setting TOP."
612 function findmakefile()
614 TOPFILE=build/core/envsetup.mk
615 # We redirect cd to /dev/null in case it's aliased to
616 # a command that prints something as a side-effect
620 while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
622 if [ -f "$T/Android.mk" ]; then
634 # If we're sitting in the root of the build tree, just do a
636 if [ -f build/core/envsetup.mk -a -f Makefile ]; then
639 # Find the closest Android.mk file.
641 local M=$(findmakefile)
642 # Remove the path to top as the makefilepath needs to be relative
643 local M=`echo $M|sed 's:'$T'/::'`
645 echo "Couldn't locate the top of the tree. Try setting TOP."
646 elif [ ! "$M" ]; then
647 echo "Couldn't locate a makefile from the current directory."
649 ONE_SHOT_MAKEFILE=$M make -C $T all_modules $@
661 local DASH_ARGS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^-.*$/')
662 local DIRS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^[^-].*$/')
663 for DIR in $DIRS ; do
664 DIR=`echo $DIR | sed -e 's:/$::'`
665 if [ -f $DIR/Android.mk ]; then
666 TO_CHOP=`(cd -P -- $T && pwd -P) | wc -c | tr -d ' '`
667 TO_CHOP=`expr $TO_CHOP + 1`
668 START=`PWD= /bin/pwd`
669 MFILE=`echo $START | cut -c${TO_CHOP}-`
670 if [ "$MFILE" = "" ] ; then
671 MFILE=$DIR/Android.mk
673 MFILE=$MFILE/$DIR/Android.mk
675 MAKEFILE="$MAKEFILE $MFILE"
677 if [ "$DIR" = snod ]; then
679 elif [ "$DIR" = showcommands ]; then
680 ARGS="$ARGS showcommands"
681 elif [ "$DIR" = dist ]; then
684 echo "No Android.mk in $DIR."
689 ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T $DASH_ARGS all_modules $ARGS
691 echo "Couldn't locate the top of the tree. Try setting TOP."
701 echo "Couldn't locate the top of the tree. Try setting TOP."
707 TOPFILE=build/core/envsetup.mk
708 # We redirect cd to /dev/null in case it's aliased to
709 # a command that prints something as a side-effect
713 while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
715 if [ -f "$T/Android.mk" ]; then
722 echo "can't find Android.mk"
729 local PID=`adb shell ps | fgrep $1 | sed -e 's/[^ ]* *\([0-9]*\).*/\1/'`
732 echo "usage: pid name"
736 # systemstack - dump the current stack trace of all threads in the system process
737 # to the usual ANR traces file
738 function systemstack()
740 adb shell echo '""' '>>' /data/anr/traces.txt && adb shell chmod 776 /data/anr/traces.txt && adb shell kill -3 $(pid system_server)
745 local OUT_ROOT=$(get_abs_build_var PRODUCT_OUT)
746 local OUT_SYMBOLS=$(get_abs_build_var TARGET_OUT_UNSTRIPPED)
747 local OUT_SO_SYMBOLS=$(get_abs_build_var TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)
748 local OUT_EXE_SYMBOLS=$(get_abs_build_var TARGET_OUT_EXECUTABLES_UNSTRIPPED)
749 local PREBUILTS=$(get_abs_build_var ANDROID_PREBUILTS)
750 if [ "$OUT_ROOT" -a "$PREBUILTS" ]; then
759 if [ "$PORT" ] ; then
767 if [ "$PROG" ] ; then
769 adb forward "tcp$PORT" "tcp$PORT"
770 adb shell gdbserver $PORT --attach $PID &
774 echo "If you haven't done so already, do this first on the device:"
775 echo " gdbserver $PORT /system/bin/$EXE"
777 echo " gdbserver $PORT --attach $PID"
781 echo >|"$OUT_ROOT/gdbclient.cmds" "set solib-absolute-prefix $OUT_SYMBOLS"
782 echo >>"$OUT_ROOT/gdbclient.cmds" "set solib-search-path $OUT_SO_SYMBOLS"
783 echo >>"$OUT_ROOT/gdbclient.cmds" "target remote $PORT"
784 echo >>"$OUT_ROOT/gdbclient.cmds" ""
786 arm-eabi-gdb -x "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
788 echo "Unable to determine build system output dir."
797 find -E . -type f -iregex '.*\.(c|h|cpp|S|java|xml|sh|mk)' -print0 | xargs -0 grep --color -n "$@"
804 find . -type f -iregex '.*\.\(c\|h\|cpp\|S\|java\|xml\|sh\|mk\)' -print0 | xargs -0 grep --color -n "$@"
811 find . -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
816 find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' \) -print0 | xargs -0 grep --color -n "$@"
821 for dir in `find . -name res -type d`; do find $dir -type f -name '*\.xml' -print0 | xargs -0 grep --color -n "$@"; done;
828 find -E . -type f -iregex '.*/(Makefile|Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -print0 | xargs -0 grep --color -n "$@"
833 find -E . -type f -iregex '.*\.(c|h|cpp|S|java|xml)' -print0 | xargs -0 grep --color -n -i "$@"
840 find . -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -type f -print0 | xargs -0 grep --color -n "$@"
845 find . -regextype posix-egrep -iregex '.*\.(c|h|cpp|S|java|xml)' -type f -print0 | xargs -0 grep --color -n -i "$@"
853 get_abs_build_var ANDROID_PREBUILTS
856 function tracedmdump()
860 echo "Couldn't locate the top of the tree. Try setting TOP."
863 local prebuiltdir=$(getprebuilt)
864 local KERNEL=$T/prebuilt/android-arm/kernel/vmlinux-qemu
867 if [ ! "$TRACE" ] ; then
868 echo "usage: tracedmdump tracename"
872 if [ ! -r "$KERNEL" ] ; then
873 echo "Error: cannot find kernel: '$KERNEL'"
877 local BASETRACE=$(basename $TRACE)
878 if [ "$BASETRACE" = "$TRACE" ] ; then
879 TRACE=$ANDROID_PRODUCT_OUT/traces/$TRACE
882 echo "post-processing traces..."
883 rm -f $TRACE/qtrace.dexlist
885 if [ $? -ne 0 ]; then
887 echo "*** Error: malformed trace. Did you remember to exit the emulator?"
891 echo "generating dexlist output..."
892 /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
893 echo "generating dmtrace data..."
894 q2dm -r $ANDROID_PRODUCT_OUT/symbols $TRACE $KERNEL $TRACE/dmtrace || return
895 echo "generating html file..."
896 dmtracedump -h $TRACE/dmtrace >| $TRACE/dmtrace.html || return
897 echo "done, see $TRACE/dmtrace.html for details"
899 echo " traceview $TRACE/dmtrace"
902 # communicate with a running device or emulator, set up necessary state,
903 # and run the hat command.
906 # process standard adb options
908 if [ $1 = "-d" -o $1 = "-e" ]; then
911 elif [ $1 = "-s" ]; then
915 local adbOptions=${adbTarget}
916 echo adbOptions = ${adbOptions}
922 if [ "$targetPid" = "" ]; then
923 echo "Usage: runhat [ -d | -e | -s serial ] target-pid [output-file]"
927 # confirm hat is available
928 if [ -z $(which hat) ]; then
929 echo "hat is not available in this configuration."
933 adb ${adbOptions} shell >/dev/null mkdir /data/misc
934 adb ${adbOptions} shell chmod 777 /data/misc
936 # send a SIGUSR1 to cause the hprof dump
937 echo "Poking $targetPid and waiting for data..."
938 adb ${adbOptions} shell kill -10 $targetPid
939 echo "Press enter when logcat shows \"hprof: heap dump completed\""
943 local availFiles=( $(adb ${adbOptions} shell ls /data/misc | grep '^heap-dump' | sed -e 's/.*heap-dump-/heap-dump-/' | sort -r | tr '[:space:][:cntrl:]' ' ') )
944 local devFile=/data/misc/${availFiles[0]}
945 local localFile=/tmp/$$-hprof
947 echo "Retrieving file $devFile..."
948 adb ${adbOptions} pull $devFile $localFile
950 adb ${adbOptions} shell rm $devFile
952 echo "Running hat on $localFile"
953 echo "View the output by pointing your browser at http://localhost:7000/"
958 function getbugreports()
960 local reports=(`adb shell ls /sdcard/bugreports | tr -d '\r'`)
962 if [ ! "$reports" ]; then
963 echo "Could not locate any bugreports."
968 for report in ${reports[@]}
970 echo "/sdcard/bugreports/${report}"
971 adb pull /sdcard/bugreports/${report} ${report}
976 function startviewserver()
979 if [ $# -gt 0 ]; then
982 adb shell service call window 1 i32 $port
985 function stopviewserver()
987 adb shell service call window 2
990 function isviewserverstarted()
992 adb shell service call window 3
997 if [ ! "$ANDROID_PRODUCT_OUT" ]; then
998 echo "Couldn't locate output files. Try running 'lunch' first." >&2
1003 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
1007 (cd "$T" && mmm tests/SmokeTest) &&
1008 adb uninstall com.android.smoketest > /dev/null &&
1009 adb uninstall com.android.smoketest.tests > /dev/null &&
1010 adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTestApp.apk &&
1011 adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTest.apk &&
1012 adb shell am instrument -w com.android.smoketest.tests/android.test.InstrumentationTestRunner
1015 # simple shortcut to the runtest command
1020 echo "Couldn't locate the top of the tree. Try setting TOP." >&2
1023 ("$T"/development/testrunner/runtest.py $@)
1027 if [[ -z "$1" ]]; then
1028 echo "Usage: godir <regex>"
1032 if [[ ! -f $T/filelist ]]; then
1033 echo -n "Creating index..."
1034 (cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist)
1039 lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq))
1040 if [[ ${#lines[@]} = 0 ]]; then
1046 if [[ ${#lines[@]} > 1 ]]; then
1047 while [[ -z "$pathname" ]]; do
1050 for line in ${lines[@]}; do
1051 printf "%6s %s\n" "[$index]" $line
1052 index=$(($index + 1))
1055 echo -n "Select one: "
1058 if [[ $choice -gt ${#lines[@]} || $choice -lt 1 ]]; then
1059 echo "Invalid choice"
1062 pathname=${lines[$(($choice-$_arrayoffset))]}
1065 # even though zsh arrays are 1-based, $foo[0] is an alias for $foo[1]
1066 pathname=${lines[0]}
1071 # Force JAVA_HOME to point to java 1.6 if it isn't already set
1072 function set_java_home() {
1073 if [ ! "$JAVA_HOME" ]; then
1076 export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
1079 export JAVA_HOME=/usr/lib/jvm/java-6-sun
1085 # determine whether arrays are zero-based (bash) or one-based (zsh)
1087 if [ -z "${_xarray[${#_xarray[@]}]}" ]
1095 # Execute the contents of any vendorsetup.sh files we can find.
1096 for f in `/bin/ls vendor/*/vendorsetup.sh vendor/*/build/vendorsetup.sh device/*/*/vendorsetup.sh 2> /dev/null`
1105 function showlog() {
1106 if (( $# >= 1 ));then
1111 GIT_PAGER=less repo forall -c "git config --get-regexp 'remote.*.url' && git log --since=\"${DAY} days ago\""
1116 GIT_PAGER=less repo forall -c 'if [ -n "$(git stash list)" ]; then echo "[${PWD##$T/}]";git stash list; echo; fi'