From 277475bf296c6c2b56776ba4fb60a1f42cb17c47 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 31 Jul 2020 11:58:26 -0700 Subject: [PATCH] do.sh build now skips non-program crates --- do.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/do.sh b/do.sh index ebb4d9f075b..49b957b4724 100755 --- a/do.sh +++ b/do.sh @@ -31,12 +31,16 @@ perform_action() { targetDir="$projectDir"/target case "$1" in build) - "$sdkDir"/rust/build.sh "$projectDir" + if [[ -f "$projectDir"/Xargo.toml ]]; then + "$sdkDir"/rust/build.sh "$projectDir" - so_path="$targetDir/$profile" - so_name="spl_${2//\-/_}" - cp "$so_path/${so_name}.so" "$so_path/${so_name}_debug.so" - "$sdkDir"/dependencies/llvm-native/bin/llvm-objcopy --strip-all "$so_path/${so_name}.so" "$so_path/$so_name.so" + so_path="$targetDir/$profile" + so_name="spl_${2//\-/_}" + cp "$so_path/${so_name}.so" "$so_path/${so_name}_debug.so" + "$sdkDir"/dependencies/llvm-native/bin/llvm-objcopy --strip-all "$so_path/${so_name}.so" "$so_path/$so_name.so" + else + echo "$projectDir does not contain a program, skipping" + fi ;; build-native) (