#!/bin/bash
vv_dir=$(dirname $(readlink -e $(which $0)))
-echo vv directory: $vv_dir
+echo clitk3 directory: $vv_dir
cd ${vv_dir}/build
+
function handle_exit
{
rm mem_use 2>>/dev/null
make -j${cpus}
else #use all the available computing power by default
cpus=$(( $(cat /proc/cpuinfo | grep -c ^processor) + 0 ))
+ echo "Building with ${cpus} cpus..."
fi
nice -n12 ionice -c3 make -j ${cpus} $@ &
sleep 1
done
rm memory_exhausted_lock 2>>/dev/null
+wait
echo Done!
echo