dotfiles/common/install_kicad_from_sources

44 lines
793 B
Text
Raw Normal View History

2014-07-25 19:56:01 +01:00
#!/bin/bash
set -e
2017-02-12 11:47:30 +00:00
cd ~/dev/
2014-07-25 19:56:01 +01:00
echo "checking out sources..."
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
2014-07-25 19:56:01 +01:00
cd build
echo "compiling...."
2014-07-25 19:56:01 +01:00
cmake -DKICAD_STABLE_VERSION=ON ../
make clean
benice make -j`nproc`
echo "installing..."
2014-07-25 19:56:01 +01:00
sudo make install
# install component libraries
2017-02-12 11:47:30 +00:00
cd ~/dev/
echo "checking out libraries..."
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
2014-07-25 19:56:01 +01:00
mkdir build
cd build/
echo "installing libraries"
2014-07-25 19:56:01 +01:00
cmake ../
sudo make install -j`nproc`
2014-07-25 19:56:01 +01:00