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