summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrahulp132019-11-27 11:07:28 +0530
committerrahulp132019-11-27 11:07:28 +0530
commit269f08af343d75443f4f13f4cb38a764427be600 (patch)
tree8df3a5fc7185225bb3cb3729399bb4849acfac8f
parenta18deb8e7595ae29a6a410834a841198a5ab8790 (diff)
downloadnghdl-269f08af343d75443f4f13f4cb38a764427be600.tar.gz
nghdl-269f08af343d75443f4f13f4cb38a764427be600.tar.bz2
nghdl-269f08af343d75443f4f13f4cb38a764427be600.zip
update installer
-rwxr-xr-xinstall-nghdl.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/install-nghdl.sh b/install-nghdl.sh
index a476ac9..958b5b2 100755
--- a/install-nghdl.sh
+++ b/install-nghdl.sh
@@ -54,11 +54,11 @@ function installDependency
echo "Installing ghdl.................................."
grep -h "ghdl" /usr/local/bin/ghdl > /dev/null
if [ $? -ne 0 ]; then
- tar -xzvf ghdl-0.36.tar.gz -C $HOME
+ tar -xzvf ghdl-0.36.tar.gz
if [ "$?" == 0 ]; then
echo "ghdl-0.36 LLVM successfully extracted to $HOME......"
echo "Changing directory to ghdl-0.36 LLVM installation..."
- cd $HOME/ghdl-0.36
+ cd ghdl-0.36/
echo "Configuring ghdl-0.36 build as per requirements....."
#Other configure flags can be found at - https://github.com/ghdl/ghdl/blob/master/configure
sudo ./configure --with-llvm-config
@@ -131,7 +131,7 @@ function installNgspice
echo "Adding softlink for the installed ngspice......"
sudo ln -s $HOME/$ngspice/install_dir/bin/ngspice /usr/bin/ngspice
- if [ "$?" == 0 ];then
+ if [ $? -ne 0 ];then
echo "Failed to add ngspice softlink"
echo "Remove earlier installations at /usr/bin/ngspice and try again..."
exit 1
@@ -184,7 +184,7 @@ function createSoftLink
else
echo "Creating symlink"
sudo ln -sf $src_dir/src/ngspice_ghdl.py nghdl
- if [ "$?" == 0 ];then
+ if [ $? -ne 0 ];then
echo "Failed to add nghdl softlink"
echo "Remove earlier installations at /usr/local/bin/nghdl and try again..."
exit 1