summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2020-09-01 18:54:06 +0100
committer Treehugger Robot <treehugger-gerrit@google.com> 2020-09-07 14:43:03 +0000
commitfa37ba22d1e996ad785f94819be286abfae2aae5 (patch)
treee1acd82bd4af7bb2e97fc1e1d4e3ac8b4fa6b1cb
parentfbc9a51d6bb4d6cc794da2aa933f4d83c4631471 (diff)
Fix problem with unexpanded glob when apex/com.android.runtime/lib64 is missing.
Also set failglob to make debugging invalid globs easier. Test: `art/tools/buildbot-build.sh --target` on arm_krait Change-Id: I1b9c74b96bc742debf985e68b4bae3e9fdef8749
-rwxr-xr-xtools/buildbot-build.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/tools/buildbot-build.sh b/tools/buildbot-build.sh
index 134a327b31..ec6ff5d383 100755
--- a/tools/buildbot-build.sh
+++ b/tools/buildbot-build.sh
@@ -16,6 +16,8 @@
set -e
+shopt -s failglob
+
if [ ! -d art ]; then
echo "Script needs to be run at the root of the android tree"
exit 1
@@ -221,14 +223,18 @@ if [[ $mode == "target" ]]; then
echo "Symlinking /apex/com.android.runtime/bin/$b to /system/bin"
ln -sf /apex/com.android.runtime/bin/$b $ANDROID_PRODUCT_OUT/system/bin/$b
done
- for p in $ANDROID_PRODUCT_OUT/system/apex/com.android.runtime/lib{,64}/bionic/*; do
- lib_dir=$(expr $p : '.*/\(lib[0-9]*\)/.*')
- lib_file=$(basename $p)
- src=/apex/com.android.runtime/${lib_dir}/bionic/${lib_file}
- dst=$ANDROID_PRODUCT_OUT/system/${lib_dir}/${lib_file}
- echo "Symlinking $src into /system/${lib_dir}"
- mkdir -p $(dirname $dst)
- ln -sf $src $dst
+ for d in $ANDROID_PRODUCT_OUT/system/apex/com.android.runtime/lib{,64}/bionic; do
+ if [ -d $d ]; then
+ for p in $d/*; do
+ lib_dir=$(expr $p : '.*/\(lib[0-9]*\)/.*')
+ lib_file=$(basename $p)
+ src=/apex/com.android.runtime/${lib_dir}/bionic/${lib_file}
+ dst=$ANDROID_PRODUCT_OUT/system/${lib_dir}/${lib_file}
+ echo "Symlinking $src into /system/${lib_dir}"
+ mkdir -p $(dirname $dst)
+ ln -sf $src $dst
+ done
+ fi
done
# Create linker config files. We run linkerconfig on host to avoid problems