diff options
author | athulappadan | 2015-09-08 16:05:35 +0530 |
---|---|---|
committer | athulappadan | 2015-09-08 16:05:35 +0530 |
commit | 1fb5e882d3064eb0b8059b534b643d6fac7e3df3 (patch) | |
tree | 0e2ad3c886f143fc0946033495c6c3ebdcd04230 | |
parent | f0e1cac6d736e2d80119f5380f5be8c8322d04b1 (diff) | |
parent | 361574908ffff1c613d1b6c93acaee0670f7d8dd (diff) | |
download | eSim-1fb5e882d3064eb0b8059b534b643d6fac7e3df3.tar.gz eSim-1fb5e882d3064eb0b8059b534b643d6fac7e3df3.tar.bz2 eSim-1fb5e882d3064eb0b8059b534b643d6fac7e3df3.zip |
Merge branch 'nghdl' into develop
-rwxr-xr-x | install-linux.sh | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/install-linux.sh b/install-linux.sh index 0bad6c28..2bdbf50f 100755 --- a/install-linux.sh +++ b/install-linux.sh @@ -19,7 +19,41 @@ # REVISION: --- #=============================================================================== +ngspiceFlag=0 + ##All Functions goes here + +function installNghdl +{ +echo -n "Do you want to install nghdl? (y/n): " +read getNghdl + +if [ $getNghdl == "y" -o $getNghdl == "Y" ];then + echo "Downloading nghdl" + wget https://github.com/FOSSEE/nghdl/archive/master.zip + unzip master.zip + mv nghdl-master nghdl + rm master.zip + + echo "Installing nghdl" + cd nghdl/ + ./install-nghdl.sh + + if [ $? -ne 0 ];then + echo -e "\n\n\nNghdl ERROR: Error while installing nghdl\n\n" + exit 0 + else + ngspiceFlag=1 + cd .. + fi +elif [ $getNghdl == "n" -o $getNghdl == "N" ];then + echo "Proceeding without installing nghdl" +else + echo "Please select the right option" + exit 0 +fi +} + function addKicadPPA { echo "Adding Kicad PPA to install latest Kicad version" @@ -33,8 +67,12 @@ function installDependency echo "Installing Kicad............" sudo apt-get install -y kicad -echo "Installing ngspice.........." -sudo apt-get install -y ngspice +if [ $ngspiceFlag -ne 1 ];then + echo "Installing ngspice.........." + sudo apt-get install -y ngspice +else + echo "ngspice already installed......" +fi echo "Installing PyQt4............" sudo apt-get install -y python-qt4 echo "Installing Matplotlib......." @@ -115,7 +153,7 @@ sudo chmod -R 777 "$esim_loc" } -###Checking if file is passsed as arguement to script +###Checking if file is passsed as argument to script if [ "$#" -eq 1 ];then option=$1 @@ -162,6 +200,7 @@ if [ $option == "--install" ];then echo "Install with proxy" #Calling functions + installNghdl addKicadPPA installDependency copyKicadLibrary @@ -171,6 +210,7 @@ if [ $option == "--install" ];then echo "Install without proxy" #Calling functions + installNghdl addKicadPPA installDependency copyKicadLibrary |