dotfiles/common/install_kicad_from_sources
2017-02-12 11:47:30 +00:00

43 lines
793 B
Bash
Executable file

#!/bin/bash
set -e
cd ~/dev/
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
cd build
echo "compiling...."
cmake -DKICAD_STABLE_VERSION=ON ../
make clean
benice make -j`nproc`
echo "installing..."
sudo make install
# install component libraries
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
mkdir build
cd build/
echo "installing libraries"
cmake ../
sudo make install -j`nproc`