dotfiles/common/install_kicad_from_sources

45 lines
820 B
Text
Raw Normal View History

2014-07-25 19:56:01 +01:00
#!/bin/bash
set -e
mkdir -p ~/build/
cd ~/build/
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
cd ~/build/kicad
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