Added missing /bin/bash at the start, bug 696 still occurring for me
[dev-env-setup.git] / iverilog-install
1 #!/bin/bash
2 if [ "$EUID" -ne 0 ]
3 then echo "Please run as root using 'sudo bash'"
4 exit
5 fi
6
7 apt-get update -y
8 apt-get install -y git autoconf make g++ bison flex gperf libreadline6-dev
9
10 # change into $SUDO_USER home directory
11 cd /home/$SUDO_USER
12 mkdir -p src/iverilog
13 cd src/iverilog
14
15 git clone https://github.com/steveicarus/iverilog.git
16
17 cd iverilog
18 git checkout v11_0
19 sh autoconf.sh
20 ./configure --prefix=/usr/local/iverilog
21 make -j$(nproc)
22 make check
23 make install
24
25 cd /home/$SUDO_USER/src/iverilog
26 chown -R $SUDO_USER .
27 chgrp -R $SUDO_USER .
28