summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2023-02-07 17:07:47 -0500
committerJeff Gaston <jeffrygaston@google.com>2023-02-07 17:10:07 -0500
commitaba07a7a3bdf67adca3b9fa45400c030153f5e1a (patch)
treec4c050417907e2b777448adacc9d4d9e8e177609
parent7311845d640df27c1b3d4fc1cef0ce55004228ca (diff)
downloadkonan-aba07a7a3bdf67adca3b9fa45400c030153f5e1a.tar.gz
copy-linux-sysroot now outputting errors to stderr
Bug: 267677006 Test: ./copy-linux-sysroot.sh >/dev/null # and see that a usage error still appears (in stderr) Change-Id: Iba0265f9001bf3b86aa39b0f3147ff5dd55dd34b
-rwxr-xr-xcopy-linux-sysroot.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/copy-linux-sysroot.sh b/copy-linux-sysroot.sh
index dc8585a..a9eb75b 100755
--- a/copy-linux-sysroot.sh
+++ b/copy-linux-sysroot.sh
@@ -11,12 +11,12 @@ set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
function usage {
- echo "Error: $1"
+ echo "Error: $1" >&2
echo "Usage: ./copy-linux-sysroot.sh --kotlin-version <kotlin-version> --target-dir <out-libs-dir>
Arguments:
--kotlin-version: The kotlin version to use.
--target-dir: The directory into which the native libraries will be exported.
- "
+ " >&2
exit 1
}
@@ -44,14 +44,14 @@ if [ -z "$KOTLIN_VERSION" ]
then
usage "Missing kotlin-version argument"
else
- echo "kotlin version: $KOTLIN_VERSION"
+ echo "kotlin version: $KOTLIN_VERSION" >&2
fi
if [ -z "$SYSROOT_LIBS_TARGET" ]
then
usage "missing target-dir argument"
else
- echo "unzip dir: $SYSROOT_LIBS_TARGET"
+ echo "unzip dir: $SYSROOT_LIBS_TARGET" >&2
fi
# linux-prebuilts.properties includes the mappings from kotlin version to the konan
@@ -62,7 +62,7 @@ then
usage "Cannot find prebuilts file for $KOTLIN_VERSION"
fi
SYSROOT_PATH="$PREBUILTS_FILE/x86_64-unknown-linux-gnu/sysroot/lib"
-echo "Prebuilts file: $PREBUILTS_FILE"
+echo "Prebuilts file: $PREBUILTS_FILE" >&2
TMP_DIR="$SYSROOT_LIBS_TARGET-extract"
mkdir -p $TMP_DIR
mkdir -p $SYSROOT_LIBS_TARGET
@@ -71,4 +71,4 @@ tar -xf $SCRIPT_DIR/$PREBUILTS_FILE.tar.gz --directory $TMP_DIR $SYSROOT_PATH
cp -R $TMP_DIR/$SYSROOT_PATH/* $SYSROOT_LIBS_TARGET/.
rm -rf $TMP_DIR
-echo "Unzipped sysroot libs into ${SYSROOT_LIBS_TARGET}" \ No newline at end of file
+echo "Unzipped sysroot libs into ${SYSROOT_LIBS_TARGET}" >&2