From fc838b9119719cd38ef310bed52ec3d5e17e6645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 11 Feb 2017 12:56:56 +0000 Subject: [PATCH] Refresh kicad installation on fedora (#101) --- common/install_kicad_from_sources | 38 ++++++++++++++++++------------- fedora/install_kicad_fedora.sh | 12 +++++++--- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/common/install_kicad_from_sources b/common/install_kicad_from_sources index 17a494d4..47e39e2d 100755 --- a/common/install_kicad_from_sources +++ b/common/install_kicad_from_sources @@ -2,37 +2,43 @@ set -e -bzr launchpad-login "saipeloan" -bzr whoami "Cyryl Plotnicki-Chudyk " +mkdir -p ~/build/ +cd ~/build/ -mkdir -p ~/build/kicad -cd ~/build/kicad - -echo "add the following pubkey to launchpad:" -cat ~/.ssh/id_rsa.pub -echo "press [enter] when the key is added" -read echo "checking out sources..." -bzr checkout lp:kicad kicad.bzr -cd kicad.bzr -mkdir build +if [[ ! -d kicad ]]; then + git clone https://github.com/KiCad/kicad-source-mirror.git kicad --recursive + cd kicad +else + cd kicad + git pull + git submodule update --init --recursive +fi + +mkdir -p build cd build echo "compiling...." cmake -DKICAD_STABLE_VERSION=ON ../ make clean -make -j8 +benice make -j`nproc` echo "installing..." sudo make install # install component libraries cd ~/build/kicad echo "checking out libraries..." -bzr checkout lp:~kicad-product-committers/kicad/library kicad-library.bzr -cd kicad-library.bzr +if [[ ! -d kicad-library ]]; then + git clone https://github.com/KiCad/kicad-library.git --recursive + cd kicad-library +else + cd kicad-library + git pull + git submodule update --init --recursive +fi mkdir build cd build/ echo "installing libraries" cmake ../ -sudo make install +sudo make install -j`nproc` diff --git a/fedora/install_kicad_fedora.sh b/fedora/install_kicad_fedora.sh index f27b2a89..4c7c020f 100755 --- a/fedora/install_kicad_fedora.sh +++ b/fedora/install_kicad_fedora.sh @@ -1,6 +1,12 @@ #!/bin/bash -sudo dnf groupinstall "C Development Tools and Libraries" -sudo dnf install bzr bzrtools cmake GLC_lib-devel glew-devel cairo-devel bzip2-devel wxGTK3-devel wxGTK-devel openssl-devel doxygen patch -../common/install_kicad_from_sources +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +set +e +sudo dnf -y remove kicad +set -e + +sudo dnf -y groupinstall "C Development Tools and Libraries" +sudo dnf -y install bzr bzrtools cmake GLC_lib-devel glew-devel cairo-devel bzip2-devel wxGTK3-devel wxGTK-devel openssl-devel doxygen patch glm-devel +$DIR/../common/install_kicad_from_sources