day2/vhdl: allow script to be run from outside its basedir

This commit is contained in:
Xiretza 2020-12-06 16:32:23 +01:00
parent cf81fd7593
commit 0c3c153004
Signed by: xiretza
GPG Key ID: 17B78226F7139993
1 changed files with 4 additions and 2 deletions

View File

@ -1,11 +1,13 @@
#!/usr/bin/env sh
#!/usr/bin/bash
set -eu
INPUT=$1
INPUT=$(readlink --canonicalize-existing "$1")
MODE=${2:-}
GHDLFLAGS="--std=08 --workdir=workdir"
cd "$(dirname "${BASH_SOURCE[0]}")"
mkdir -p workdir
if [[ $MODE = "--synth" ]]; then