From d1e5e9efc1767d2ca46cc32a3234c87a11669f30 Mon Sep 17 00:00:00 2001 From: nmke-de Date: Fri, 24 Dec 2021 14:30:24 +0100 Subject: [PATCH] Bugfixes --- .gitignore | 2 +- make.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a6555fa..3b510c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ vs - +gen diff --git a/make.sh b/make.sh index 406a6bb..64828d4 100644 --- a/make.sh +++ b/make.sh @@ -7,13 +7,16 @@ get_data () { } infile="" -outfile="" +outfile="vs" ap_state="normal" while [ $# -gt 0 ]; do - [ $ap_state = "get_outfile" ] && outfile=$1 && ap_state="normal" && continue - [ $1 = "-o" ] && [$ap_state = "normal" ] && ap_state="get_outfile" && continue - [ $1 = "-h" ] && echo "Syntax: $0 [-h|-o Outputfile] Inputfile" && exit 0 + echo $1 + [ $ap_state = "get_outfile" ] && outfile=$1 && ap_state="normal" + [ $1 = "-o" ] && [$ap_state = "normal" ] && ap_state="get_outfile" + [ $1 = "-h" ] && echo "Syntax: $0 [--help|-h|-o Outputfile] Inputfile" && exit 0 [ $1 = "--help" ] && echo "Syntax: $0 [--help|-h|-o Outputfile] Inputfile" && exit 0 + [ $1 != "-o" ] && [ $ap_state = "normal" ] && infile=$1 + shift done test -z $infile && echo "No input file." >> /dev/stderr && exit 1