Skip to content

Commit

Permalink
refactor: pipeline script
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jan 10, 2024
1 parent 78adce2 commit 7206f79
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions pipeline.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
#!/bin/bash
set -x
set -e
mkdir -p pipeline
cd pipeline

shopt -s expand_aliases

EO=0.34.2
alias eo="eoc --parser=${EO}"

cat > app.eo <<EOT
[args] > app
QQ.io.stdout > @
"Hello, world!\n"
EOT

eoc "--parser=${EO}" clean
eoc "--parser=${EO}" link
eoc "--parser=${EO}" --alone dataize app > before.txt
eo clean
eo link
eo --alone dataize app > before.txt

eoc "--parser=${EO}" phi
eo phi

# Now, you modify/normalize this file:
# .eoc/phi/app.phi

eoc "--parser=${EO}" unphi
eo unphi

cp .eoc/unphi/app.xmir .eoc/2-optimize/app.xmir

eoc "--parser=${EO}" print
eo print

cp .eoc/print/app.eo app.eo

eoc "--parser=${EO}" clean
eoc "--parser=${EO}" link
eoc "--parser=${EO}" --alone dataize app > after.txt
eo clean
eo link
eo --alone dataize app > after.txt

if [ "$(cat before.txt)" == "$(cat after.txt)" ]; then
echo 'SUCCESS'
Expand Down

0 comments on commit 7206f79

Please sign in to comment.