2020 day2/vhdl: allow script to be run from outside its basedir
This commit is contained in:
parent
3ab9f6bb2e
commit
15203be615
1 changed files with 4 additions and 2 deletions
|
@ -1,11 +1,13 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
INPUT=$1
|
INPUT=$(readlink --canonicalize-existing "$1")
|
||||||
MODE=${2:-}
|
MODE=${2:-}
|
||||||
GHDLFLAGS="--std=08 --workdir=workdir"
|
GHDLFLAGS="--std=08 --workdir=workdir"
|
||||||
|
|
||||||
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
mkdir -p workdir
|
mkdir -p workdir
|
||||||
|
|
||||||
if [[ $MODE = "--synth" ]]; then
|
if [[ $MODE = "--synth" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue