aboutsummaryrefslogtreecommitdiff
path: root/build/tools
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-05-03 14:11:37 -0700
committerDavid 'Digit' Turner <digit@google.com>2010-05-03 14:43:26 -0700
commit52a3c27f1384be5ade6404ca047d2428274c13b3 (patch)
tree2930db66de8c9a984b61d43be436910f3a2738fb /build/tools
parent562bcc4ca053f8cbed8ca6e0f9fabbcb1cfce51d (diff)
downloadndk-52a3c27f1384be5ade6404ca047d2428274c13b3.tar.gz
Fix --package option processing in build/tools/download-toolchain-sources.sh
Also fix common option processing on OS X. Its 'expr' command works slightly differently from Linux. Change-Id: I7d79b8cea1b14eb8f0efe67f5fb08db342bbbf84
Diffstat (limited to 'build/tools')
-rwxr-xr-xbuild/tools/download-toolchain-sources.sh8
-rw-r--r--build/tools/prebuilt-common.sh2
2 files changed, 6 insertions, 4 deletions
diff --git a/build/tools/download-toolchain-sources.sh b/build/tools/download-toolchain-sources.sh
index 52d1a2130..bfc0e74ab 100755
--- a/build/tools/download-toolchain-sources.sh
+++ b/build/tools/download-toolchain-sources.sh
@@ -72,9 +72,11 @@ if [ -z "$SRC_DIR" -a $OPTION_PACKAGE = no ] ; then
exit 1
fi
-mkdir -p $SRC_DIR
-SRC_DIR=`cd $SRC_DIR && pwd`
-log "Using target source directory: $SRC_DIR"
+if [ -n "$SRC_DIR" ] ; then
+ mkdir -p $SRC_DIR
+ SRC_DIR=`cd $SRC_DIR && pwd`
+ log "Using target source directory: $SRC_DIR"
+fi
# Create temp directory where everything will be copied first
#
diff --git a/build/tools/prebuilt-common.sh b/build/tools/prebuilt-common.sh
index 073f4528a..44a518eb0 100644
--- a/build/tools/prebuilt-common.sh
+++ b/build/tools/prebuilt-common.sh
@@ -192,7 +192,7 @@ extract_parameters ()
while [ -n "$1" ] ; do
# If the parameter does not begin with a dash
# it is not an option.
- param=`expr -- "$1" : '^\([^-].*\)$'`
+ param=`expr -- "$1" : '^\([^\-].*\)$'`
if [ -n "$param" ] ; then
if [ -z "$PARAMETERS" ] ; then
PARAMETERS="$1"