aboutsummaryrefslogtreecommitdiff
path: root/meta/create_bootstrap.sh
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-07 23:07:57 -0500
committerMustafa Quraish <[email protected]>2022-02-08 02:07:18 -0500
commite5f2fac8c5ae5a1b74335816836872c2e24904e6 (patch)
treeed131049d39320967d8d18f65749c08ebb2f79a0 /meta/create_bootstrap.sh
parentMark bootstrap files as binary in `.gitattributes` (diff)
downloadcup-master.tar.xz
cup-master.zip
[cup] Add `>>` and `<<` operators, `fork()` buildin and `SYS_execve`HEADmaster
Diffstat (limited to 'meta/create_bootstrap.sh')
-rwxr-xr-xmeta/create_bootstrap.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/create_bootstrap.sh b/meta/create_bootstrap.sh
new file mode 100755
index 0000000..312b395
--- /dev/null
+++ b/meta/create_bootstrap.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Checkpoint the current state of the system by creating a new bootstrap
+# NASM file for MacOS and Linux to ./bootstrap/
+
+# TODO
+set -xe
+
+build/cup.out compiler/main.cup -o bootstrap/cup.nasm
+make bootstrap/cup.out
+
+case "$(uname -s)" in
+ Darwin)
+ cp bootstrap/cup.nasm bootstrap/macos.nasm
+ ;;
+ Linux)
+ cp bootstrap/cup.nasm bootstrap/linux.nasm
+ ;;
+esac
+
+rm -f bootstrap/cup.nasm