44 lines
820 B
Bash
Executable file
44 lines
820 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
mkdir -p ~/build/
|
|
cd ~/build/
|
|
|
|
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 ~/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
|
|
mkdir build
|
|
cd build/
|
|
echo "installing libraries"
|
|
cmake ../
|
|
sudo make install -j`nproc`
|
|
|