summaryrefslogtreecommitdiff
path: root/install-linux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install-linux.sh')
-rwxr-xr-xinstall-linux.sh133
1 files changed, 67 insertions, 66 deletions
diff --git a/install-linux.sh b/install-linux.sh
index 2bdbf50f..01c6a8c6 100755
--- a/install-linux.sh
+++ b/install-linux.sh
@@ -56,97 +56,98 @@ fi
function addKicadPPA
{
-echo "Adding Kicad PPA to install latest Kicad version"
-sudo add-apt-repository ppa:js-reynaud/ppa-kicad
-sudo apt-get update
+ echo "Adding Kicad PPA to install latest Kicad version"
+ sudo add-apt-repository ppa:js-reynaud/ppa-kicad
+ sudo apt-get update
}
function installDependency
{
-echo "Installing Kicad............"
-sudo apt-get install -y kicad
-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......."
-sudo apt-get install -y python-matplotlib
+ echo "Installing Kicad............"
+ sudo apt-get install -y kicad
+ 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......."
+ sudo apt-get install -y python-matplotlib
}
function copyKicadLibrary
{
-#Copy Kicad library made for eSim
-sudo cp -r kicadSchematicLibrary/*.lib /usr/share/kicad/library/
-sudo cp -r kicadSchematicLibrary/*.dcm /usr/share/kicad/library/
+ #Copy Kicad library made for eSim
+ sudo cp -r kicadSchematicLibrary/*.lib /usr/share/kicad/library/
+ sudo cp -r kicadSchematicLibrary/*.dcm /usr/share/kicad/library/
-# Full path of 'kicad.pro file'[Verified for Ubuntu 12.04]
-KICAD_PRO="/usr/share/kicad/template/kicad.pro"
-KICAD_ORIGINAL="/usr/share/kicad/template/kicad.pro.original"
+ # Full path of 'kicad.pro file'[Verified for Ubuntu 12.04]
+ KICAD_PRO="/usr/share/kicad/template/kicad.pro"
+ KICAD_ORIGINAL="/usr/share/kicad/template/kicad.pro.original"
-if [ -f "$KICAD_ORIGINAL" ];then
- echo "kicad.pro.original file found....."
- sudo cp -rv kicadSchematicLibrary/kicad.pro ${KICAD_PRO}
-else
- echo "Making copy of original file"
- sudo cp -rv ${KICAD_PRO}{,.original}
- sudo cp -rv kicadSchematicLibrary/kicad.pro ${KICAD_PRO}
-fi
+ if [ -f "$KICAD_ORIGINAL" ];then
+ echo "kicad.pro.original file found....."
+ sudo cp -rv kicadSchematicLibrary/kicad.pro ${KICAD_PRO}
+ else
+ echo "Making copy of original file"
+ sudo cp -rv ${KICAD_PRO}{,.original}
+ sudo cp -rv kicadSchematicLibrary/kicad.pro ${KICAD_PRO}
+ fi
}
function copySourceCode
{
-#Creating eSim directory
-esim_loc="/opt/eSim"
-
-if [ -d "$esim_loc" ];then
- #sudo rm -r "$esim_loc"
- #sudo mkdir -v "$esim_loc"
-
- #Copy source code to eSim directory
- sudo cp -rvp src/configuration/* "$esim_loc/src/configuration"
- sudo cp -rvp src/modelParamXML/* "$esim_loc/src/modelParamXML"
- sudo cp -rvp src/modelEditor/* "$esim_loc/src/modelEditor"
- sudo cp -rvp src/projManagement/* "$esim_loc/src/projManagement"
- sudo cp -rvp src/ngspiceSimulation/* "$esim_loc/src/ngspiceSimulation"
- sudo cp -rvp src/kicadtoNgspice/* "$esim_loc/src/kicadtoNgspice"
- sudo cp -rvp src/browser/* "$esim_loc/src/browser"
- sudo cp -rvp src/frontEnd/* "$esim_loc/src/frontEnd"
- sudo cp -rvp kicadSchematicLibrary "$esim_loc"
- sudo cp -rvp images "$esim_loc"
-else
- sudo mkdir -v "$esim_loc"
- #Copy source code to eSim directory
- sudo cp -rvp src "$esim_loc"
- sudo cp -rvp kicadSchematicLibrary "$esim_loc"
- sudo cp -rvp images "$esim_loc"
-fi
+ #Creating eSim directory
+ esim_loc="/opt/eSim"
+
+ if [ -d "$esim_loc" ];then
+ #sudo rm -r "$esim_loc"
+ #sudo mkdir -v "$esim_loc"
+
+ #Copy source code to eSim directory
+ sudo cp -rvp src/configuration/* "$esim_loc/src/configuration"
+ sudo cp -rvp src/modelParamXML/* "$esim_loc/src/modelParamXML"
+ sudo cp -rvp src/modelEditor/* "$esim_loc/src/modelEditor"
+ sudo cp -rvp src/projManagement/* "$esim_loc/src/projManagement"
+ sudo cp -rvp src/ngspiceSimulation/* "$esim_loc/src/ngspiceSimulation"
+ sudo cp -rvp src/kicadtoNgspice/* "$esim_loc/src/kicadtoNgspice"
+ sudo cp -rvp src/browser/* "$esim_loc/src/browser"
+ sudo cp -rvp src/frontEnd/* "$esim_loc/src/frontEnd"
+ sudo cp -rvp src/ngspicetoModelica/* "$esim_loc/src/ngspicetoModelica"
+ sudo cp -rvp kicadSchematicLibrary "$esim_loc"
+ sudo cp -rvp images "$esim_loc"
+ else
+ sudo mkdir -v "$esim_loc"
+ #Copy source code to eSim directory
+ sudo cp -rvp src "$esim_loc"
+ sudo cp -rvp kicadSchematicLibrary "$esim_loc"
+ sudo cp -rvp images "$esim_loc"
+ fi
-if [ "$?" -eq 1 ];then
- echo "Unable to create /opt/eSim "
- exit 1;
-else
- echo "Created /opt/eSim"
-fi
+ if [ "$?" -eq 1 ];then
+ echo "Unable to create /opt/eSim "
+ exit 1;
+ else
+ echo "Created /opt/eSim"
+ fi
-#Copy desktop icon file to Desktop
-cp -vp esim.desktop $HOME/Desktop/
+ #Copy desktop icon file to Desktop
+ cp -vp esim.desktop $HOME/Desktop/
-#Copy esim start script
-sudo cp -vp esim-start.sh /usr/bin/esim
+ #Copy esim start script
+ sudo cp -vp esim-start.sh /usr/bin/esim
-#Change mode of eSim directory
-sudo chmod -R 777 "$esim_loc"
+ #Change mode of eSim directory
+ sudo chmod -R 777 "$esim_loc"