Added iverilog setup script.
authorR Veera Kumar <vklr@vkten.in>
Sat, 22 May 2021 12:10:00 +0000 (17:40 +0530)
committerR Veera Kumar <vklr@vkten.in>
Sat, 22 May 2021 12:10:00 +0000 (17:40 +0530)
iverilog-install [new file with mode: 0755]

diff --git a/iverilog-install b/iverilog-install
new file mode 100755 (executable)
index 0000000..0da8e4a
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+if [ "$EUID" -ne 0 ]
+  then echo "Please run as root using 'sudo bash'"
+  exit
+fi
+
+apt-get update -y
+apt-get install -y git autoconf make g++ bison flex gperf libreadline6-dev
+
+# change into $SUDO_USER home directory
+cd /home/$SUDO_USER
+mkdir -p src/iverilog
+cd src/iverilog
+
+git clone https://github.com/steveicarus/iverilog.git
+
+cd iverilog
+git checkout v11_0
+sh autoconf.sh
+./configure --prefix=/usr/local/iverilog
+make -j$(nproc)
+make check
+make install
+
+cd /home/$SUDO_USER/src/iverilog
+chown -R $SUDO_USER .
+chgrp -R $SUDO_USER .
+