summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-04-22 08:16:56 -0700
committerDoug Zongker <dougz@android.com>2011-04-22 08:16:56 -0700
commit2903498319b6483078c694cd06c701537a65988c (patch)
tree707797a3f5b436a96a356de0b261bb2a1e3d3175 /envsetup.sh
parentddbcad8c852980aabd2c7b02b909726d5c697182 (diff)
downloadbuild-2903498319b6483078c694cd06c701537a65988c.zip
build-2903498319b6483078c694cd06c701537a65988c.tar.gz
build-2903498319b6483078c694cd06c701537a65988c.tar.bz2
don't use bashism just to remove trailing ':'
Change-Id: I9f86baa65406ac547cee70a273eb730ca47df66b
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/envsetup.sh b/envsetup.sh
index bbc345a..3973479 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -100,8 +100,9 @@ function setpaths()
export PATH=${PATH/$ANDROID_BUILD_PATHS/}
fi
if [ -n $ANDROID_PRE_BUILD_PATHS ] ; then
- shopt -s extglob
- export PATH=${PATH/$ANDROID_PRE_BUILD_PATHS?(:)/}
+ export PATH=${PATH/$ANDROID_PRE_BUILD_PATHS/}
+ # strip trailing ':', if any
+ export PATH=${PATH/%:/}
fi
# and in with the new
@@ -1065,7 +1066,7 @@ function godir () {
echo ""
fi
local lines
- lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq))
+ lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq))
if [[ ${#lines[@]} = 0 ]]; then
echo "Not found"
return
@@ -1078,7 +1079,7 @@ function godir () {
local line
for line in ${lines[@]}; do
printf "%6s %s\n" "[$index]" $line
- index=$(($index + 1))
+ index=$(($index + 1))
done
echo
echo -n "Select one: "