diff options
| author | Tslil Clingman <hiato1@gmail.com> | 2013-03-26 15:19:47 +0200 |
|---|---|---|
| committer | Tslil Clingman <hiato1@gmail.com> | 2013-03-26 15:19:47 +0200 |
| commit | 8c19617946822d7aeac61696294f893d5e5eca6f (patch) | |
| tree | c4df5faffc6b335b2c48e2fadd7d6125a33a6056 /ci | |
Init scripts
Diffstat (limited to 'ci')
| -rwxr-xr-x | ci | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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 |
