Addition of a small script to easily rebuild all targets

This commit is contained in:
King_DuckZ 2013-08-23 14:28:41 +02:00
parent aad2501499
commit c8e1ba69ad

33
rebuildall.sh Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
function cd {
if (("$#" > 0)); then
if [ "$1" == "-" ]; then
popd &> /dev/null
return $?
else
pushd "$@" &> /dev/null
return $?
fi
else
cd $HOME
return $?
fi
}
for z in Debug Release Final
do
cd $z
retCode=$?
if [ $retCode != 0 ]; then
mkdir $z && cd $z
retCode=$?
fi
if [ $retCode == 0 ]; then
rm -rf *
cmake ../../ -DCMAKE_BUILD_TYPE=$z
make -j2
cd ..
fi
done