diff options
author | athulappadan | 2015-09-07 17:03:28 +0530 |
---|---|---|
committer | athulappadan | 2015-09-07 17:03:28 +0530 |
commit | a99dae868433a89ad0b0074bc58bcebdf7e0beed (patch) | |
tree | 0e2ad3c886f143fc0946033495c6c3ebdcd04230 | |
parent | 1b8b56a9d74c7dcdc3c9c2e4bd918ada8dcb6da9 (diff) | |
download | eSim-a99dae868433a89ad0b0074bc58bcebdf7e0beed.tar.gz eSim-a99dae868433a89ad0b0074bc58bcebdf7e0beed.tar.bz2 eSim-a99dae868433a89ad0b0074bc58bcebdf7e0beed.zip |
integrating nghdl with eSim
-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 |