aboutsummaryrefslogtreecommitdiff
path: root/meta/create_bootstrap.sh
blob: 312b395377e12394440fd7a1da0217896af8cc9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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