+end_dir="$PWD"
+cd ~/.gmqcc/testsuite/projects
+start="$PWD"
+find . -maxdepth 1 -mindepth 1 -type d | while read -r line
+do
+ line="${line#./}"
+ echo -n "compiling $line... "
+ cd "${start}/${line}"
+
+ # does the project have multiple subprojects?
+ if [ -f dirs ]; then
+ echo ""
+ cat dirs | while read -r dir
+ do
+ # change to subproject
+ echo -n " compiling $dir... "
+ old="$PWD"
+ cd "$dir"
+ cmd="$(cat ../../../options | grep "$line:" | awk '{print substr($0, index($0, $2))}')"
+ "$gmqcc_bin" $cmd > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "error"
+ else
+ echo "success"
+ fi
+ cd "$old"
+ done
+ # nope only one project
+ else
+ cmd="$(cat ../../options | grep "$line:" | awk '{print substr($0, index($0, $2))}')"
+ "$gmqcc_bin" $cmd > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "error"
+ else
+ echo "success"
+ fi
+ fi