Skip to content

Commit 20d0278

Browse files
authored
Fix build_rust_sdk.sh script to work on linux (#3291)
A few linux distributions don't have `gdate`, but I think they should all have `date`.
1 parent 738295a commit 20d0278

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/sdk/build_rust_sdk.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ set -e
77
read -p "Do you want to build the Rust SDK from local source (yes/no) default to yes? " buildLocal
88
buildLocal=${buildLocal:-yes}
99

10-
date=$(gdate +%Y%m%d%H%M%S)
10+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
11+
date=$(date +%Y%m%d%H%M%S)
12+
else
13+
date=$(gdate +%Y%m%d%H%M%S)
14+
fi
15+
1116
elementPwd=$(pwd)
1217

1318
# Ask for the Rust SDK local source path

0 commit comments

Comments
 (0)