diff --git a/zombienet.sh b/zombienet.sh index 1089d4d..4288260 100755 --- a/zombienet.sh +++ b/zombienet.sh @@ -3,12 +3,6 @@ ZOMBIENET_V=v1.3.68 POLKADOT_V=v1.1.0 -POLKADOT_FILES=( - "polkadot" - "polkadot-execute-worker" - "polkadot-prepare-worker" -) - case "$(uname -s)" in Linux*) MACHINE=Linux;; Darwin*) MACHINE=Mac;; @@ -31,7 +25,9 @@ build_polkadot(){ git checkout polkadot-$POLKADOT_V echo "building polkadot executable..." cargo build --release --features fast-runtime - cp "${POLKADOT_FILES[@]/#/target/release/}" "$CWD/bin" + cp target/release/polkadot "$CWD/bin" + cp target/release/polkadot-execute-worker "$CWD/bin" + cp target/release/polkadot-prepare-worker "$CWD/bin" popd popd } @@ -42,9 +38,9 @@ zombienet_init() { curl -LO https://github.com/paritytech/zombienet/releases/download/$ZOMBIENET_V/$ZOMBIENET_BIN chmod +x $ZOMBIENET_BIN fi - for file in "${POLKADOT_FILES[@]}"; do - [[ -f "bin/$file" ]] || { build_polkadot; break; } - done + if [ ! -f bin/polkadot ] || [ ! -f bin/polkadot-execute-worker ] || [ ! -f bin/polkadot-prepare-worker ]; then + build_polkadot + fi } zombienet_spawn() {