From 515c31a1f08d7ba500bf7261d7018a250dfd9779 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Sun, 24 Jan 2021 20:22:24 -0500 Subject: Posix shell so new way of generating RANDOM --- ci | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'ci') diff --git a/ci b/ci index 3870b3c..e1e1709 100755 --- a/ci +++ b/ci @@ -1,32 +1,32 @@ #!/usr/bin/env sh # Convenient frontend for quickly evaluating C code -LIBR="stdlib stdio math ieee754 limits stdint" +LIBR="stdlib stdio math ieee754 limits stdint stdstring" FLAG="-Wall -lm" -NAME=/tmp/$RANDOM-$RANDOM +gen_rand() { + od -A n -t d -N 1 /dev/urandom | tr -d ' ' +} + +NAME=/tmp/$(gen_rand)-$(gen_rand) SRC=$NAME.c BIN=$NAME-B -for k in $LIBR; do - echo "#include<$k.h>" >> $SRC +for k in $LIBR; do + echo "#include<$k.h>" >> $SRC done -#echo -e "int main(int argc, char ** argv) {\n\n return 0;\n}" >> $SRC -#zile +8 $SRC - echo "int main(int argc, char ** argv) {" >> $SRC rlwrap -o cat >> $SRC echo "return 0;}" >> $SRC - -echo -e "\n\n\t!!! Compiling ..." -gcc $FLAG $SRC -o $BIN +printf "\n\n\t!!! Compiling ..." +cc $FLAG $SRC -o $BIN if [ "$?" = "0" ]; then - echo -e "\t!!! Executing ...\n\n" - exec $BIN - rm $BIN + printf "\n\n\t!!! Executing ...\n\n" + exec $BIN + rm $BIN fi; rm $SRC -- cgit v1.2.3