prebuild 537 Bytes
Newer Older
1 2 3
#!/bin/bash
# Compile le-edubar files before creating the package

4 5 6 7 8 9
read -p "Do you want to compile le-edubar (y|N)?" YN
if [ "$YN" != "y" ]; then
    echo "Canceling le-edubar compilation."
    exit 0
fi

10 11 12 13 14
PREV_DIR="$(pwd)"
PREFIX_DIR="$(dirname $0)"

mkdir -p "$PREFIX_DIR/src/le-edubar/build/"
cd "$PREFIX_DIR/src/le-edubar/build/"
15
cmake .. -DCMAKE_INSTALL_PREFIX="../../../package/usr" -DCMAKE_PROGRAM_PATH="/usr" -Wno-dev
16 17 18 19 20
make -j $(grep -c ^processor /proc/cpuinfo)
make install

cd $PREV_DIR
rm -r "$PREFIX_DIR/src/le-edubar/build/"