Add Utility scripts, bootstrap & build-debug.sh
This commit is contained in:
parent
e332e3ec0a
commit
aa6bfd528e
49
bootstrap.sh
Executable file
49
bootstrap.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
die()
|
||||
{
|
||||
rc=${2:-255}
|
||||
echo "Error: ${1}"
|
||||
|
||||
exit ${rc}
|
||||
}
|
||||
|
||||
cmdecho()
|
||||
{
|
||||
need_to_die=1
|
||||
|
||||
if [ "${1}" == "--optional" ] || [ "${1}" == "-o" ]; then
|
||||
echo "optional"
|
||||
need_to_die=0
|
||||
shift;
|
||||
fi
|
||||
|
||||
|
||||
echo "$ ${@}"
|
||||
if [ ${need_to_die} -ne 0 ]; then
|
||||
${@} || die "${1} returned error code ${?}"
|
||||
else
|
||||
${@}
|
||||
fi
|
||||
|
||||
#return ${?}
|
||||
}
|
||||
|
||||
cmdecho git config -f .gitmodules submodule.third_party/FakeIt.shallow true
|
||||
cmdecho -o git submodule update --init --recursive
|
||||
|
||||
|
||||
if [ ${?} -ne 0 ]; then
|
||||
cmdecho rm -rf third_party/FakeIt
|
||||
|
||||
cmdecho git submodule update --init --recursive
|
||||
fi
|
||||
|
||||
if [ "x$1" == "x-f" ] || [ ! -x ./configure ]; then
|
||||
cmdecho autoreconf -iv
|
||||
fi
|
||||
if [ ! -x ./configure ]; then
|
||||
die "./configure does not exist. Check configure.ac and the autotools!"
|
||||
fi
|
||||
|
||||
#cmdecho ./rebuild-qtforms.sh
|
20
build-debug.sh
Executable file
20
build-debug.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
BASE_DIR="$(cd "$(dirname "$0")"; pwd)";
|
||||
|
||||
die() {
|
||||
echo "An error has occured. Stopping"
|
||||
return 1
|
||||
}
|
||||
|
||||
mkdir -pv $BASE_DIR/debug
|
||||
cd $BASE_DIR/debug
|
||||
|
||||
. $BASE_DIR/debug.env
|
||||
|
||||
if [ ! -f ${PWD}/config.status ]; then
|
||||
${BASE_DIR}/configure $@ || die
|
||||
fi
|
||||
|
||||
# build with NICE=15 so as to not hog the processor
|
||||
nice -n 15 make -j 1 V=1 check all
|
Loading…
Reference in New Issue
Block a user