run: allow passing an intermediate stage
This commit is contained in:
parent
2305f1030e
commit
1a703be634
36
run
36
run
|
@ -196,11 +196,37 @@ step40() {
|
||||||
echo "zig1.wasm updated for $TO_"
|
echo "zig1.wasm updated for $TO_"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step50() {
|
||||||
|
local FROM="$CALL_USAGES"
|
||||||
|
local FROM_="$CALL_USAGES_"
|
||||||
|
local TO="$BUILTIN_TYPE"
|
||||||
|
local TO_="$BUILTIN_TYPE_"
|
||||||
|
|
||||||
|
echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_"
|
||||||
|
rm -fr "../zig-$TO_"
|
||||||
|
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
|
||||||
|
{
|
||||||
|
pushd "../zig-$TO_"
|
||||||
|
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm
|
||||||
|
fullbuild
|
||||||
|
build/stage3/bin/zig build update-zig1
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
echo "zig1.wasm updated for $TO_"
|
||||||
|
}
|
||||||
|
|
||||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||||
set -xeuo pipefail
|
set -xeuo pipefail
|
||||||
step00
|
step=${1:-step00}
|
||||||
step10
|
step=${step#step}
|
||||||
step20
|
|
||||||
step30
|
# works:
|
||||||
step40
|
if [[ "$step" -le 00 ]] ; then step00; fi
|
||||||
|
if [[ "$step" -le 10 ]] ; then step10; fi
|
||||||
|
if [[ "$step" -le 20 ]] ; then step20; fi
|
||||||
|
if [[ "$step" -le 30 ]] ; then step30; fi
|
||||||
|
if [[ "$step" -le 40 ]] ; then step40; fi
|
||||||
|
|
||||||
|
# does not work:
|
||||||
|
if [[ "$step" -le 50 ]] ; then step50; fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue