From 6aa1acc4b7a42c6621b683be0988cd836c94d1f5 Mon Sep 17 00:00:00 2001 From: Avinash Krishna Date: Mon, 2 Oct 2023 22:25:08 +0530 Subject: [PATCH] Minor changes in the script! --- main/run | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main/run b/main/run index 718024f..85874dc 100755 --- a/main/run +++ b/main/run @@ -3,22 +3,22 @@ ### No need to memorize numerous commands for executing and compiling code in various programming languages. ### Just provide the programming file as an argument to this script. -file=$1; -no_extension=${file%.*} +file="$1"; +no_extension="${file%.*}" if [[ "$file" == *.cpp || "$file" == *.c ]]; then - make $no_extension - ./$no_extension + make "$no_extension" + ./"$no_extension" elif [[ "$file" == *.java ]]; then - javac $file; - java $no_extension; + javac "$file"; + java "$no_extension"; elif [[ "$file" == *.py ]]; then - python $file; + python "$file"; elif [[ "$file" == *.sh ]]; then - bash $file; + bash "$file"; else echo "Unable to compile this file format!"; fi