From 35bccfc8d22db7d64bee2fc8d7fe16bd5ad371b3 Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Mon, 12 Jun 2023 13:26:28 +0300 Subject: [PATCH] fixup scripts --- scripts/build-circuit-ll.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/build-circuit-ll.sh b/scripts/build-circuit-ll.sh index 14323be..e652927 100755 --- a/scripts/build-circuit-ll.sh +++ b/scripts/build-circuit-ll.sh @@ -1,11 +1,25 @@ #/usr/bin/env bash set -euxo pipefail +check_file_exists() { + FILE1="${1}" + if [ ! -e "$FILE1" ] + then + echo "File $FILE1 was not created" >&2 + exit 1 + else + echo "File $FILE1 created successfully" + fi +} + rm -rf build && mkdir build && cd build cmake -DCIRCUIT_ASSEMBLY_OUTPUT=TRUE .. make template + ls -hal ls -hal src/ +check_file_exists "./src/template.ll" + assigner \ -b src/template.ll \ -i ../src/main.inp \ @@ -14,4 +28,7 @@ assigner \ -e pallas ls -hal -ls -hal src/ \ No newline at end of file +ls -hal src/ +check_file_exists "./template.crct" +check_file_exists "./template.tbl" +