blob: a89d199abe27f727fb22f3a87ec57e5bc3637b11 [file] [log] [blame]
#!/bin/bash
# helper script to unzip KMP's host libraries into the given folder, if necessary (linux).
set -e
# find script
SCRIPT_DIR="$(cd $(dirname $0) && pwd)"
SYSROOT_DIR=$1
mkdir -p $SYSROOT_DIR
# TODO Can we find a more reliable way to get the kotlin native version?
KOTLIN_NATIVE_VERSION=$(grep "kotlinNative =" gradle/libs.versions.toml| cut -d "=" -f2|tr -d '"'|cut -d " " -f2)
# extract it into the out dir
$SCRIPT_DIR/../../../../prebuilts/androidx/konan/copy-linux-sysroot.sh \
--kotlin-version $KOTLIN_NATIVE_VERSION \
--target-dir $SYSROOT_DIR