Browse Source

Merge pull request #2779 from hughns/build-sdk-fix

Escape paths in build_rust_sdk script
pull/2787/head
Benoit Marty 5 months ago committed by GitHub
parent
commit
4c6bac8aeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      tools/sdk/build_rust_sdk.sh

10
tools/sdk/build_rust_sdk.sh

@ -29,11 +29,11 @@ else
cd matrix-rust-sdk-$date cd matrix-rust-sdk-$date
git checkout ${rustSdkBranch} git checkout ${rustSdkBranch}
rustSdkPath=$(pwd) rustSdkPath=$(pwd)
cd ${elementPwd} cd "${elementPwd}"
fi fi
cd ${rustSdkPath} cd "${rustSdkPath}"
git status git status
read -p "Will build with this version of the Rust SDK ^. Is it correct (yes/no) default to yes? " sdkCorrect read -p "Will build with this version of the Rust SDK ^. Is it correct (yes/no) default to yes? " sdkCorrect
@ -47,7 +47,7 @@ fi
read -p "Do you want to build the app after (yes/no) default to yes? " buildApp read -p "Do you want to build the app after (yes/no) default to yes? " buildApp
buildApp=${buildApp:-yes} buildApp=${buildApp:-yes}
cd ${elementPwd} cd "${elementPwd}"
# If folder ../matrix-rust-components-kotlin does not exist, clone the repo # If folder ../matrix-rust-components-kotlin does not exist, clone the repo
if [ ! -d "../matrix-rust-components-kotlin" ]; then if [ ! -d "../matrix-rust-components-kotlin" ]; then
@ -62,9 +62,9 @@ git checkout main
git pull git pull
printf "\nBuilding the SDK for aarch64-linux-android...\n\n" printf "\nBuilding the SDK for aarch64-linux-android...\n\n"
./scripts/build.sh -p ${rustSdkPath} -m sdk -t aarch64-linux-android -o ${elementPwd}/libraries/rustsdk ./scripts/build.sh -p "${rustSdkPath}" -m sdk -t aarch64-linux-android -o "${elementPwd}/libraries/rustsdk"
cd ${elementPwd} cd "${elementPwd}"
mv ./libraries/rustsdk/sdk-android-debug.aar ./libraries/rustsdk/matrix-rust-sdk.aar mv ./libraries/rustsdk/sdk-android-debug.aar ./libraries/rustsdk/matrix-rust-sdk.aar
mkdir -p ./libraries/rustsdk/sdks mkdir -p ./libraries/rustsdk/sdks
cp ./libraries/rustsdk/matrix-rust-sdk.aar ./libraries/rustsdk/sdks/matrix-rust-sdk-${date}.aar cp ./libraries/rustsdk/matrix-rust-sdk.aar ./libraries/rustsdk/sdks/matrix-rust-sdk-${date}.aar

Loading…
Cancel
Save