diff options
author | rahulp13 | 2019-12-19 11:46:33 +0530 |
---|---|---|
committer | rahulp13 | 2019-12-19 11:46:33 +0530 |
commit | 35278c9895401a728a0f31ce9afb4dcbb0a3c64f (patch) | |
tree | ed122eec4d8eaa822e255b69c978ffa60eddcfed /install-eSim.sh | |
parent | 9ba83b756f2c188a1c5a5a6b76aacd46968d8286 (diff) | |
download | eSim-35278c9895401a728a0f31ce9afb4dcbb0a3c64f.tar.gz eSim-35278c9895401a728a0f31ce9afb4dcbb0a3c64f.tar.bz2 eSim-35278c9895401a728a0f31ce9afb4dcbb0a3c64f.zip |
abort installation on apt errors
Diffstat (limited to 'install-eSim.sh')
-rwxr-xr-x | install-eSim.sh | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/install-eSim.sh b/install-eSim.sh index 948e36f2..50e35c48 100755 --- a/install-eSim.sh +++ b/install-eSim.sh @@ -15,7 +15,7 @@ # NOTES: --- # AUTHOR: Fahim Khan, Rahul Paknikar, Saurabh Bansode # ORGANIZATION: FOSSEE at IIT Bombay. -# CREATED: Wednesday 26 November 2019 16:14 +# CREATED: Wednesday 18 December 2019 16:14 # REVISION: --- #=============================================================================== @@ -56,7 +56,7 @@ function installNghdl ./install-nghdl.sh --install if [ $? -ne 0 ];then - echo -e "\n\n\nNghdl ERROR: Error while installing nghdl\n\n" + echo -e "\n\nNghdl ERROR: Error while installing nghdl\n\n" exit 0 else ngspiceFlag=1 @@ -84,19 +84,33 @@ function addKicadPPA sudo add-apt-repository --yes ppa:js-reynaud/kicad-4 sudo apt-get update else - echo "Kicad-4 is available in synaptic" + echo "KiCad-4 is available in synaptic" fi } function installDependency { - echo "Installing Kicad............" + echo "Installing KiCad............" sudo apt-get install -y kicad + if [ $? -ne 0 ]; then + echo -e "\n\nKiCad couldn't be installed.\nKindly resolve above APT repository errors and try again." + exit 1 + fi + echo "Installing PyQt4............" sudo apt-get install -y python-qt4 + if [ $? -ne 0 ]; then + echo -e "\n\nPyQt-4 dependency couldn't be installed.\nKindly resolve above APT repository errors and try again." + exit 1 + fi + echo "Installing Matplotlib......." sudo apt-get install -y python-matplotlib + if [ $? -ne 0 ]; then + echo -e "\n\nMatplotlib dependency couldn't be installed.\nKindly resolve above APT repository errors and try again." + exit 1 + fi } @@ -114,7 +128,7 @@ function copyKicadLibrary echo "fp-lib-table copied in the directory" sudo cp -r src/.OfflineFiles/TerminalBlock_Altech_AK300-2_P5.00mm.kicad_mod /usr/share/kicad/modules/Connectors_Terminal_Blocks.pretty/ sudo cp -r src/.OfflineFiles/TO-220-3_Vertical.kicad_mod /usr/share/kicad/modules/TO_SOT_Packages_THT.pretty/ - #Copy Kicad library made for eSim + #Copy KiCad library made for eSim sudo cp -r kicadSchematicLibrary/*.lib /usr/share/kicad/library/ sudo cp -r kicadSchematicLibrary/*.dcm /usr/share/kicad/library/ @@ -268,7 +282,7 @@ elif [ $option == "--uninstall" ];then if [ $getConfirmation == "y" -o $getConfirmation == "Y" ];then echo "Deleting Files................" sudo rm -rf $HOME/.esim $HOME/.config/kicad $HOME/Desktop/esim.desktop esim-start.sh esim.desktop /usr/bin/esim - echo "Removing Kicad................" + echo "Removing KiCad................" sudo apt-get remove -y kicad echo "Removing NGHDL................" rm -rf src/modelParamXML/Nghdl/* @@ -293,4 +307,4 @@ else echo "Please select the proper operation." echo "--install" echo "--uninstall" -fi
\ No newline at end of file +fi |