1
Fork 0

remove echo statements, make var names consistent

more helpful
This commit is contained in:
Motiejus Jakštys 2024-11-07 09:09:25 +02:00
parent 084b5b082a
commit ec42eb8bc8
1 changed files with 35 additions and 82 deletions

117
run
View File

@ -81,21 +81,17 @@ step00() {
STEP01=9d93b2ccf11f584320a2c5209dd2d94705167695 STEP01=9d93b2ccf11f584320a2c5209dd2d94705167695
STEP01_=0.10.0-675-g9d93b2ccf1 STEP01_=0.10.0-675-g9d93b2ccf1
step01() { step01() {
local TO="$STEP01" rm -fr "../zig-$STEP01_"
local TO_="$STEP01_" git archive --prefix=zig-$STEP01_/ $STEP01 | tar -C .. -x
echo "Generating zig1.wasm.zst for $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP01_"
cp "$OLDPWD/stage1/zig1.wasm.zst" stage1/ cp "$OLDPWD/stage1/zig1.wasm.zst" stage1/
patch -p1 <"$HERE/0.10.0-675-g9d93b2ccf1-TypeOf-hack.patch" patch -p1 <"$HERE/0.10.0-675-g9d93b2ccf1-TypeOf-hack.patch"
fullbuild fullbuild
build/stage3/bin/zig build update-zig1 build/stage3/bin/zig build update-zig1
popd popd
} }
echo "zig1.wasm.zst was built for BoundFn hack"
} }
# commit d10fd78d4615f329141f5c19f893039d56aff425 # commit d10fd78d4615f329141f5c19f893039d56aff425
@ -111,21 +107,16 @@ step01() {
STEP02=d10fd78d4615f329141f5c19f893039d56aff425 STEP02=d10fd78d4615f329141f5c19f893039d56aff425
STEP02_=0.10.0-722-gd10fd78d46 STEP02_=0.10.0-722-gd10fd78d46
step02() { step02() {
local FROM_="$STEP01_" rm -fr "../zig-$STEP02_"
local TO="$STEP02" git archive --prefix=zig-$STEP02_/ $STEP02 | tar -C .. -x
local TO_="$STEP02_"
echo "Generating zig1.wasm.zst for $STEP02_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP02_"
zstd -cd ../zig-$FROM_/stage1/zig1.wasm.zst >stage1/zig1.wasm zstd -cd ../zig-$STEP01_/stage1/zig1.wasm.zst >stage1/zig1.wasm
fullbuild fullbuild
build/stage3/bin/zig build update-zig1 build/stage3/bin/zig build update-zig1
popd popd
} }
echo "zig1.wasm.zst was built for C-aarch64 backend"
} }
# commit 7b2a936173165002105ba5e76bed69654e132fea # commit 7b2a936173165002105ba5e76bed69654e132fea
@ -137,21 +128,15 @@ step02() {
STEP03=7b2a936173165002105ba5e76bed69654e132fea STEP03=7b2a936173165002105ba5e76bed69654e132fea
STEP03_=0.10.0-747-g7b2a936173 STEP03_=0.10.0-747-g7b2a936173
step03() { step03() {
local FROM_="$STEP02_" rm -fr "../zig-$STEP03_"
local TO="$STEP03" git archive --prefix=zig-$STEP03_/ $STEP03 | tar -C .. -x
local TO_="$STEP03_"
echo "Updating zig1.wasm $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP03_"
patch -p1 <"$HERE/0.10.0-747-g7b2a936173-CallOptions.patch" 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 popd
} }
echo "zig1.wasm updated for $TO"
} }
# commit 08b2d491bcd8c79c68495267cc71967661caea1e # commit 08b2d491bcd8c79c68495267cc71967661caea1e
@ -163,22 +148,16 @@ step03() {
STEP04=08b2d491bcd8c79c68495267cc71967661caea1e STEP04=08b2d491bcd8c79c68495267cc71967661caea1e
STEP04_=0.10.0-748-g08b2d491bc STEP04_=0.10.0-748-g08b2d491bc
step04() { step04() {
local FROM_="$STEP03_" rm -fr "../zig-$STEP04_"
local TO="$STEP04" git archive --prefix=zig-$STEP04_/ $STEP04 | tar -C .. -x
local TO_="$STEP04_"
echo "Updating zig1.wasm $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP04_"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm cp ../zig-$STEP03_/stage1/zig1.wasm stage1/zig1.wasm
fullbuild fullbuild
build/stage3/bin/zig build update-zig1 build/stage3/bin/zig build update-zig1
popd popd
} }
echo "zig1.wasm updated for $TO_"
} }
# commit 35184bff75420f405cb703c9cf86b196843b9a94 (HEAD) # commit 35184bff75420f405cb703c9cf86b196843b9a94 (HEAD)
@ -190,16 +169,11 @@ step04() {
STEP05=aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 STEP05=aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6
STEP05_=0.10.0-851-gaac2d6b56f STEP05_=0.10.0-851-gaac2d6b56f
step05() { step05() {
local FROM_="$STEP04_" rm -fr "../zig-$STEP05_"
local TO="$STEP05" git archive --prefix=zig-$STEP05_/ $STEP05 | tar -C .. -x
local TO_="$STEP05_"
echo "Updating zig1.wasm $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP05_"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm cp ../zig-$STEP04_/stage1/zig1.wasm stage1/zig1.wasm
fullbuild fullbuild
popd popd
} }
@ -214,19 +188,13 @@ step05() {
STEP06=2a5e1426aa9469fadb78e837d0100d689213b034 STEP06=2a5e1426aa9469fadb78e837d0100d689213b034
STEP06_=0.10.0-853-g2a5e1426aa STEP06_=0.10.0-853-g2a5e1426aa
step06() { step06() {
local FROM_="$STEP05_" rm -fr "../zig-$STEP06_"
local TO="$STEP06" git archive --prefix=zig-$STEP06_/ $STEP06 | tar -C .. -x
local TO_="$STEP06_"
echo "Updating zig1.wasm $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP06_"
"../zig-$FROM_/build/stage3/bin/zig" build update-zig1 "../zig-$STEP05_/build/stage3/bin/zig" build update-zig1
popd popd
} }
echo "zig1.wasm updated for $TO_"
} }
# commit 54160e7f6aecb4628df633ceaef4c6d956429a3d # commit 54160e7f6aecb4628df633ceaef4c6d956429a3d
@ -238,17 +206,12 @@ step06() {
STEP07=54160e7f6aecb4628df633ceaef4c6d956429a3d STEP07=54160e7f6aecb4628df633ceaef4c6d956429a3d
STEP07_=0.10.0-961-g54160e7f6a STEP07_=0.10.0-961-g54160e7f6a
step07() { step07() {
local FROM_="$STEP06_" rm -fr "../zig-$STEP07_"
local TO="$STEP07" git archive --prefix=zig-$STEP07_/ $STEP07 | tar -C .. -x
local TO_="$STEP07_"
echo "Building zig2 $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP07_"
patch -p1 <"$HERE/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch" 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" # same as "fullbuild", except the make target does not have "install"
rm -fr build rm -fr build
@ -272,16 +235,11 @@ step07() {
STEP08=622311fb9ac7ee6d93dcb8cda4b608751f7e092a STEP08=622311fb9ac7ee6d93dcb8cda4b608751f7e092a
STEP08_=0.10.0-962-g622311fb9a STEP08_=0.10.0-962-g622311fb9a
step08() { step08() {
local FROM_="$STEP07_" rm -fr "../zig-$STEP08_"
local TO="$STEP08" git archive --prefix=zig-$STEP08_/ $STEP08 | tar -C .. -x
local TO_="$STEP08_"
echo "Updating zig1.wasm $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP08_"
../zig-$FROM_/build/zig2 build --zig-lib-dir lib update-zig1 ../zig-$STEP07_/build/zig2 build --zig-lib-dir lib update-zig1
popd popd
} }
} }
@ -295,16 +253,11 @@ step08() {
STEP09=a43fdc1620fa24c8c606f748505766bfd53d1049 STEP09=a43fdc1620fa24c8c606f748505766bfd53d1049
STEP09_=0.10.0-1027-ga43fdc1620 STEP09_=0.10.0-1027-ga43fdc1620
step09() { step09() {
local FROM_="$STEP08_" rm -fr "../zig-$STEP09_"
local TO="$STEP09" git archive --prefix=zig-$STEP09_/ $STEP09 | tar -C .. -x
local TO_="$STEP09_"
echo "Updating stage3 $FROM_ -> $TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{ {
pushd "../zig-$TO_" pushd "../zig-$STEP09_"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm cp ../zig-$STEP08_/stage1/zig1.wasm stage1/zig1.wasm
fullbuild fullbuild
popd popd
} }