X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=redo;h=51f7affff8e68dbc404ff65f4e33a4dbbe470de9;hb=30527e3b2e26d508c50619be9a84c7548c7e0f8f;hp=8f459fbdd6e2ac9f85e9d567c77975165a1bcb47;hpb=64cd5fdd5279471fbc417cc54d4d0048383ff3f9;p=plomrogue
diff --git a/redo b/redo
index 8f459fb..51f7aff 100755
--- a/redo
+++ b/redo
@@ -18,9 +18,31 @@
# for a
# workaround.
-echo "non-redo stuff (preparing for future Python port sans redo needs):"
-echo "Building library for server's Python variant with mere shell one-liner."
-./compile-server.sh
+# Some tests first: for gcc, and certain necessary header files. (This is not
+# strictly the responsibility of a mere redo wrapper. But those using a
+# pre-installed redo probably will be fine with the error messages thrown by it
+# if these miss.)
+test=`command -v gcc | wc -l`
+if [ 1 != $test ]
+then
+ echo "FAILURE:"
+ echo "No gcc installed, but it's needed!"
+ exit 1
+fi
+test_header() {
+ code="#include <$1>"
+ test=`echo $code | cpp -H -o /dev/null 2>&1 | head -n1 | grep error | wc -l`
+ if [ 0 != $test ]
+ then
+ echo "FAILURE:"
+ echo "No $1 header file found, but it's needed!"
+ echo "Maybe install some $2 package?"
+ exit 1
+ fi
+}
+test_header stdlib.h libc6-dev # Assume stdlib.h guarantees full libc6-dev.
+test_header ncurses.h libncurses5-dev
+# The actual redo calling.
export PATH=$PATH:$PWD/build/redo_scripts
redo "$@"