diff options
author | David 'Digit' Turner <digit@google.com> | 2010-05-03 14:11:37 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-05-03 14:43:26 -0700 |
commit | 52a3c27f1384be5ade6404ca047d2428274c13b3 (patch) | |
tree | 2930db66de8c9a984b61d43be436910f3a2738fb /build/tools | |
parent | 562bcc4ca053f8cbed8ca6e0f9fabbcb1cfce51d (diff) | |
download | ndk-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-x | build/tools/download-toolchain-sources.sh | 8 | ||||
-rw-r--r-- | build/tools/prebuilt-common.sh | 2 |
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" |