summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorTslil Clingman <hiato1@gmail.com>2013-03-26 15:19:47 +0200
committerTslil Clingman <hiato1@gmail.com>2013-03-26 15:19:47 +0200
commit8c19617946822d7aeac61696294f893d5e5eca6f (patch)
treec4df5faffc6b335b2c48e2fadd7d6125a33a6056 /ci
Init scripts
Diffstat (limited to 'ci')
-rwxr-xr-xci27
1 files changed, 27 insertions, 0 deletions
diff --git a/ci b/ci
new file mode 100755
index 0000000..32c828b
--- /dev/null
+++ b/ci
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+LIBR="stdlib stdio math ieee754"
+FLAG="-Wall -lm"
+
+NAME=/tmp/$RANDOM-$RANDOM
+SRC=$NAME.c
+BIN=$NAME-B
+
+for k in $LIBR; do
+ echo "#include<$k.h>" >> $SRC
+done
+
+echo "int main(int argc, char ** argv) {" >> $SRC
+cat - >> $SRC
+echo "return 0; }" >> $SRC
+
+echo -e "\n\n\t!!! Compiling ..."
+gcc $FLAG $SRC -o $BIN
+
+if [ "$?" = "0" ]; then
+ echo -e "\t!!! Executing ...\n\n"
+ exec $BIN
+ rm $BIN
+fi;
+
+rm $SRC