aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranthony-coulter <65789231+anthony-coulter@users.noreply.github.com>2020-05-22 17:34:52 -0500
committerGitHub <noreply@github.com>2020-05-22 15:34:52 -0700
commitb7c09621ea87e99cca42da307e461707c6e7cbf1 (patch)
tree5b9cc9df21eb8b2fcd6a9450089ffd99fc4fdda0
parent667433bbee4ba0a10f569ac4ad8b52578574ff31 (diff)
downloadspike-b7c09621ea87e99cca42da307e461707c6e7cbf1.zip
spike-b7c09621ea87e99cca42da307e461707c6e7cbf1.tar.gz
spike-b7c09621ea87e99cca42da307e461707c6e7cbf1.tar.bz2
Make gen_icache script use only POSIX commands (#470)
The `seq` utility is not available in OpenBSD. Co-authored-by: Anthony Coulter <riscv@anthonycoulter.name>
-rwxr-xr-xriscv/gen_icache5
1 files changed, 3 insertions, 2 deletions
diff --git a/riscv/gen_icache b/riscv/gen_icache
index 7ec3c69..67c0d69 100755
--- a/riscv/gen_icache
+++ b/riscv/gen_icache
@@ -1,7 +1,8 @@
#!/bin/sh
-n=$(($1-1))
-for i in `seq 0 $n`
+i=0
+while [ $i -lt $1 ]
do
echo case $i: ICACHE_ACCESS\($i\)\;
+ i=$((i+1))
done
echo