diff options
Diffstat (limited to 'install-linux.sh')
-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 |