From ec42eb8bc88a90d096684ee1f11c626437313546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 7 Nov 2024 09:09:25 +0200 Subject: [PATCH] remove echo statements, make var names consistent more helpful --- run | 117 ++++++++++++++++++------------------------------------------ 1 file changed, 35 insertions(+), 82 deletions(-) diff --git a/run b/run index 5779cd8..c5870aa 100755 --- a/run +++ b/run @@ -81,21 +81,17 @@ step00() { STEP01=9d93b2ccf11f584320a2c5209dd2d94705167695 STEP01_=0.10.0-675-g9d93b2ccf1 step01() { - local TO="$STEP01" - local TO_="$STEP01_" - echo "Generating zig1.wasm.zst for $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP01_" + git archive --prefix=zig-$STEP01_/ $STEP01 | tar -C .. -x { - pushd "../zig-$TO_" + pushd "../zig-$STEP01_" cp "$OLDPWD/stage1/zig1.wasm.zst" stage1/ patch -p1 <"$HERE/0.10.0-675-g9d93b2ccf1-TypeOf-hack.patch" fullbuild build/stage3/bin/zig build update-zig1 popd } - echo "zig1.wasm.zst was built for BoundFn hack" } # commit d10fd78d4615f329141f5c19f893039d56aff425 @@ -111,21 +107,16 @@ step01() { STEP02=d10fd78d4615f329141f5c19f893039d56aff425 STEP02_=0.10.0-722-gd10fd78d46 step02() { - local FROM_="$STEP01_" - local TO="$STEP02" - local TO_="$STEP02_" - echo "Generating zig1.wasm.zst for $STEP02_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP02_" + git archive --prefix=zig-$STEP02_/ $STEP02 | tar -C .. -x { - pushd "../zig-$TO_" - zstd -cd ../zig-$FROM_/stage1/zig1.wasm.zst >stage1/zig1.wasm + pushd "../zig-$STEP02_" + zstd -cd ../zig-$STEP01_/stage1/zig1.wasm.zst >stage1/zig1.wasm fullbuild build/stage3/bin/zig build update-zig1 popd } - echo "zig1.wasm.zst was built for C-aarch64 backend" } # commit 7b2a936173165002105ba5e76bed69654e132fea @@ -137,21 +128,15 @@ step02() { STEP03=7b2a936173165002105ba5e76bed69654e132fea STEP03_=0.10.0-747-g7b2a936173 step03() { - local FROM_="$STEP02_" - local TO="$STEP03" - local TO_="$STEP03_" - - echo "Updating zig1.wasm $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP03_" + git archive --prefix=zig-$STEP03_/ $STEP03 | tar -C .. -x { - pushd "../zig-$TO_" + pushd "../zig-$STEP03_" patch -p1 <"$HERE/0.10.0-747-g7b2a936173-CallOptions.patch" - "../zig-$FROM_/build/stage3/bin/zig" build --zig-lib-dir lib update-zig1 + "../zig-$STEP02_/build/stage3/bin/zig" build --zig-lib-dir lib update-zig1 popd } - echo "zig1.wasm updated for $TO" } # commit 08b2d491bcd8c79c68495267cc71967661caea1e @@ -163,22 +148,16 @@ step03() { STEP04=08b2d491bcd8c79c68495267cc71967661caea1e STEP04_=0.10.0-748-g08b2d491bc step04() { - local FROM_="$STEP03_" - local TO="$STEP04" - local TO_="$STEP04_" - - echo "Updating zig1.wasm $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP04_" + git archive --prefix=zig-$STEP04_/ $STEP04 | tar -C .. -x { - pushd "../zig-$TO_" - cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm + pushd "../zig-$STEP04_" + cp ../zig-$STEP03_/stage1/zig1.wasm stage1/zig1.wasm fullbuild build/stage3/bin/zig build update-zig1 popd } - echo "zig1.wasm updated for $TO_" } # commit 35184bff75420f405cb703c9cf86b196843b9a94 (HEAD) @@ -190,16 +169,11 @@ step04() { STEP05=aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 STEP05_=0.10.0-851-gaac2d6b56f step05() { - local FROM_="$STEP04_" - local TO="$STEP05" - local TO_="$STEP05_" - - echo "Updating zig1.wasm $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP05_" + git archive --prefix=zig-$STEP05_/ $STEP05 | tar -C .. -x { - pushd "../zig-$TO_" - cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm + pushd "../zig-$STEP05_" + cp ../zig-$STEP04_/stage1/zig1.wasm stage1/zig1.wasm fullbuild popd } @@ -214,19 +188,13 @@ step05() { STEP06=2a5e1426aa9469fadb78e837d0100d689213b034 STEP06_=0.10.0-853-g2a5e1426aa step06() { - local FROM_="$STEP05_" - local TO="$STEP06" - local TO_="$STEP06_" - - echo "Updating zig1.wasm $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP06_" + git archive --prefix=zig-$STEP06_/ $STEP06 | tar -C .. -x { - pushd "../zig-$TO_" - "../zig-$FROM_/build/stage3/bin/zig" build update-zig1 + pushd "../zig-$STEP06_" + "../zig-$STEP05_/build/stage3/bin/zig" build update-zig1 popd } - echo "zig1.wasm updated for $TO_" } # commit 54160e7f6aecb4628df633ceaef4c6d956429a3d @@ -238,17 +206,12 @@ step06() { STEP07=54160e7f6aecb4628df633ceaef4c6d956429a3d STEP07_=0.10.0-961-g54160e7f6a step07() { - local FROM_="$STEP06_" - local TO="$STEP07" - local TO_="$STEP07_" - - echo "Building zig2 $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP07_" + git archive --prefix=zig-$STEP07_/ $STEP07 | tar -C .. -x { - pushd "../zig-$TO_" + pushd "../zig-$STEP07_" patch -p1 <"$HERE/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch" - cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm + cp ../zig-$STEP06_/stage1/zig1.wasm stage1/zig1.wasm # same as "fullbuild", except the make target does not have "install" rm -fr build @@ -272,16 +235,11 @@ step07() { STEP08=622311fb9ac7ee6d93dcb8cda4b608751f7e092a STEP08_=0.10.0-962-g622311fb9a step08() { - local FROM_="$STEP07_" - local TO="$STEP08" - local TO_="$STEP08_" - - echo "Updating zig1.wasm $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP08_" + git archive --prefix=zig-$STEP08_/ $STEP08 | tar -C .. -x { - pushd "../zig-$TO_" - ../zig-$FROM_/build/zig2 build --zig-lib-dir lib update-zig1 + pushd "../zig-$STEP08_" + ../zig-$STEP07_/build/zig2 build --zig-lib-dir lib update-zig1 popd } } @@ -295,16 +253,11 @@ step08() { STEP09=a43fdc1620fa24c8c606f748505766bfd53d1049 STEP09_=0.10.0-1027-ga43fdc1620 step09() { - local FROM_="$STEP08_" - local TO="$STEP09" - local TO_="$STEP09_" - - echo "Updating stage3 $FROM_ -> $TO_" - rm -fr "../zig-$TO_" - git archive --prefix=zig-$TO_/ $TO | tar -C .. -x + rm -fr "../zig-$STEP09_" + git archive --prefix=zig-$STEP09_/ $STEP09 | tar -C .. -x { - pushd "../zig-$TO_" - cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm + pushd "../zig-$STEP09_" + cp ../zig-$STEP08_/stage1/zig1.wasm stage1/zig1.wasm fullbuild popd }