Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nmke-de committed Dec 24, 2021
1 parent 9594abf commit d1e5e9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vs

gen
11 changes: 7 additions & 4 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d1e5e9e

Please sign in to comment.