diff --git a/content/main_compiler.sh b/content/main_compiler.sh index 9f3743c..5cea36b 100755 --- a/content/main_compiler.sh +++ b/content/main_compiler.sh @@ -21,6 +21,10 @@ SUB_FILE=$2 . ${PROB_FDR}/${PROB_CODE}/compilation_script.sh +if ! file --mime -b ${SUBPATH} | grep -i -q "ascii" ; then # checking for ASCII source files + return $FAILURE +fi + # Now perform string-matching to get the extension # and the corresponding "executable" SUBPATH=${SUB_FDR}/${SUB_FILE} @@ -57,5 +61,5 @@ case "$SUBPATH" in ;; esac -# Return the return value of the +# Return the status of compilation return $?