DISABLE FDs (REMOVE ME).
[jackhill/mal.git] / vhdl / run_vhdl.sh
CommitLineData
36e91db4
DM
1#!/bin/bash
2
3# ghdl doesn't allow passing command-line arguments to the VHDL program. To
4# circumvent that, we write the command-line arguments as lines in
5# vhdl_argv.tmp, and read the content of that file at the beginning of the VHDL
6# program.
7
8cleanup() {
9 trap - TERM QUIT INT EXIT
10 rm -f vhdl_argv.tmp
11}
12trap "cleanup" TERM QUIT INT EXIT
13
14bin="$1"
15shift
16
17for arg in "$@" ; do
18 echo "$arg"
19done > vhdl_argv.tmp
20
21$bin