From 840739d874706f2a9361cb8ccaa96069ed70c60b Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Sun, 4 Dec 2022 13:04:36 +0530 Subject: [PATCH 01/12] Added perl support --- run | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run b/run index 7595ee6..f633622 100755 --- a/run +++ b/run @@ -204,6 +204,9 @@ run() { go run "$FILE" fi + elif [[ ${FILE#*.} == pl ]]; then + perl "$FILE" + else _ERROR_UFTC_ _EXIT_ @@ -235,7 +238,7 @@ for arg in "$@"; do echo ;; - *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go") + *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go"| *".pl") FILE_LOCATION=$arg if [[ ! -f $FILE_LOCATION ]]; then _ERROR_UFTC_ From 46cab0323d80bc800355853c664197f50983d40f Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Sun, 4 Dec 2022 13:42:17 +0530 Subject: [PATCH 02/12] Adding lua support --- run | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run b/run index f633622..f6bc1a7 100755 --- a/run +++ b/run @@ -207,6 +207,9 @@ run() { elif [[ ${FILE#*.} == pl ]]; then perl "$FILE" + elif [[ ${FILE#*.} == lua ]]; then + lua "$FILE" + else _ERROR_UFTC_ _EXIT_ @@ -235,10 +238,12 @@ for arg in "$@"; do echo " ${yellow}>>${white} Bash-Script" echo " ${yellow}>>${white} Javascript ${cyan}[${white}with ${green}debug${white} support${cyan}]" echo " ${yellow}>>${white} Golang" + echo " ${yellow}>>${white} Perl" + echo " ${yellow}>>${white} Lua" echo ;; - *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go"| *".pl") + *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go" | *".pl" | *".lua") FILE_LOCATION=$arg if [[ ! -f $FILE_LOCATION ]]; then _ERROR_UFTC_ From e1a2efef57376df380e99b687e30431c48295654 Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Sun, 4 Dec 2022 13:47:21 +0530 Subject: [PATCH 03/12] Adding ruby support --- run | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/run b/run index f6bc1a7..32693b8 100755 --- a/run +++ b/run @@ -210,6 +210,9 @@ run() { elif [[ ${FILE#*.} == lua ]]; then lua "$FILE" + elif [[ ${FILE#*.} == rb ]]; then + ruby "$FILE" + else _ERROR_UFTC_ _EXIT_ @@ -240,10 +243,11 @@ for arg in "$@"; do echo " ${yellow}>>${white} Golang" echo " ${yellow}>>${white} Perl" echo " ${yellow}>>${white} Lua" + echo " ${yellow}>>${white} Ruby" echo ;; - *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go" | *".pl" | *".lua") + *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go" | *".pl" | *".lua" | *".rb") FILE_LOCATION=$arg if [[ ! -f $FILE_LOCATION ]]; then _ERROR_UFTC_ From b0ab441a9d9b5c4025059f81dffb974c4257317c Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Sun, 4 Dec 2022 14:09:55 +0530 Subject: [PATCH 04/12] Adding haskell support --- run | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/run b/run index 32693b8..259b388 100755 --- a/run +++ b/run @@ -213,6 +213,9 @@ run() { elif [[ ${FILE#*.} == rb ]]; then ruby "$FILE" + elif [[ ${FILE#*.} == hs ]]; then + runghc "$FILE" + else _ERROR_UFTC_ _EXIT_ @@ -244,10 +247,11 @@ for arg in "$@"; do echo " ${yellow}>>${white} Perl" echo " ${yellow}>>${white} Lua" echo " ${yellow}>>${white} Ruby" + echo " ${yellow}>>${white} Haskell" echo ;; - *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go" | *".pl" | *".lua" | *".rb") + *".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go" | *".pl" | *".lua" | *".rb" | *".hs") FILE_LOCATION=$arg if [[ ! -f $FILE_LOCATION ]]; then _ERROR_UFTC_ From 80a13c5da2fc2775197f5ea9df83aa63cbd9d197 Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Thu, 8 Dec 2022 22:12:49 +0530 Subject: [PATCH 05/12] Haskell compiler and --no-persistent option --- run | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/run b/run index 259b388..c0577f9 100755 --- a/run +++ b/run @@ -214,7 +214,14 @@ run() { ruby "$FILE" elif [[ ${FILE#*.} == hs ]]; then - runghc "$FILE" + if [[ $COMPILE == true ]]; then + ghc --make "$FILE" + if [[ $PERSISTENT != true ]]; then + rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}" + fi + else + runghc "$FILE" + fi else _ERROR_UFTC_ @@ -306,6 +313,9 @@ for arg in "$@"; do "--persistent" | "p") PERSISTENT=true ;; + "--no-persistent" | "np") + PERSISTENT=false + ;; "--compile" | "c") COMPILE=true PERSISTENT=true From 207e3d37a2ab424cad2c4b8b934079a8f0694690 Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Thu, 8 Dec 2022 22:22:56 +0530 Subject: [PATCH 06/12] Haskell debugging support --- run | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/run b/run index c0577f9..067fb61 100755 --- a/run +++ b/run @@ -214,15 +214,18 @@ run() { ruby "$FILE" elif [[ ${FILE#*.} == hs ]]; then - if [[ $COMPILE == true ]]; then + if [[ $DEBUG == true ]]; then + ghci "$FILE" + elif [[ $COMPILE == true ]]; then ghc --make "$FILE" - if [[ $PERSISTENT != true ]]; then - rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}" - fi else runghc "$FILE" fi + if [[ $PERSISTENT != true ]]; then + rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}" + fi + else _ERROR_UFTC_ _EXIT_ From 20726826b4d18f26355777ac963df19af45a1660 Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Thu, 8 Dec 2022 23:18:46 +0530 Subject: [PATCH 07/12] Fixed a small bug --- run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run b/run index 067fb61..217c466 100755 --- a/run +++ b/run @@ -223,7 +223,7 @@ run() { fi if [[ $PERSISTENT != true ]]; then - rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}" + rm "${FILE%%.*}.o" "${FILE%%.*}.hi" fi else From 693cc59231f9a60ec01c16617b5237206b41599f Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Fri, 9 Dec 2022 12:35:47 +0530 Subject: [PATCH 08/12] Removed --no-persistant --- run | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/run b/run index 217c466..20f10d6 100755 --- a/run +++ b/run @@ -197,34 +197,34 @@ run() { elif [[ ${FILE#*.} == go ]]; then if [[ $COMPILE == true ]]; then go build -o "${FILE%%.*}.out" "$FILE" - if [[ $PERSISTENT != true ]]; then - rm "${FILE%%.*}.out" - fi else go run "$FILE" fi + if [[ $PERSISTENT != true ]]; then + rm "${FILE%%.*}.out" + fi elif [[ ${FILE#*.} == pl ]]; then perl "$FILE" elif [[ ${FILE#*.} == lua ]]; then - lua "$FILE" + lua "$FILE" elif [[ ${FILE#*.} == rb ]]; then - ruby "$FILE" + ruby "$FILE" elif [[ ${FILE#*.} == hs ]]; then if [[ $DEBUG == true ]]; then ghci "$FILE" elif [[ $COMPILE == true ]]; then ghc --make "$FILE" - else - runghc "$FILE" - fi + else + runghc "$FILE" + fi - if [[ $PERSISTENT != true ]]; then - rm "${FILE%%.*}.o" "${FILE%%.*}.hi" - fi + if [[ $PERSISTENT != true ]]; then + rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}" + fi else _ERROR_UFTC_ @@ -316,9 +316,6 @@ for arg in "$@"; do "--persistent" | "p") PERSISTENT=true ;; - "--no-persistent" | "np") - PERSISTENT=false - ;; "--compile" | "c") COMPILE=true PERSISTENT=true From 934ad9d4eaf1e9bbde135c11646a520ffc27a22a Mon Sep 17 00:00:00 2001 From: Yogansh Sharma Date: Fri, 9 Dec 2022 12:40:37 +0530 Subject: [PATCH 09/12] Fixed orientation --- run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run b/run index 20f10d6..9efcc9d 100755 --- a/run +++ b/run @@ -205,7 +205,7 @@ run() { fi elif [[ ${FILE#*.} == pl ]]; then - perl "$FILE" + perl "$FILE" elif [[ ${FILE#*.} == lua ]]; then lua "$FILE" From 0a46473ad4a4fe10f7d75699314eccd4bdf11afc Mon Sep 17 00:00:00 2001 From: YoganshSharma <38936915+YoganshSharma@users.noreply.github.com> Date: Sat, 10 Dec 2022 12:20:39 +0530 Subject: [PATCH 10/12] Update run Co-authored-by: Arpit Bhardwaj --- run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run b/run index 9efcc9d..06bcaa9 100755 --- a/run +++ b/run @@ -257,7 +257,7 @@ for arg in "$@"; do echo " ${yellow}>>${white} Perl" echo " ${yellow}>>${white} Lua" echo " ${yellow}>>${white} Ruby" - echo " ${yellow}>>${white} Haskell" + echo " ${yellow}>>${white} Haskell ${cyan}[${white}with ${green}debug${white} support${cyan}]" echo ;; From 0636282e246c13dfdb48d20d818094cdc7b76754 Mon Sep 17 00:00:00 2001 From: YoganshSharma <38936915+YoganshSharma@users.noreply.github.com> Date: Sat, 10 Dec 2022 12:22:24 +0530 Subject: [PATCH 11/12] Update run Co-authored-by: Arpit Bhardwaj --- run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run b/run index 06bcaa9..1ba46b1 100755 --- a/run +++ b/run @@ -216,7 +216,8 @@ run() { elif [[ ${FILE#*.} == hs ]]; then if [[ $DEBUG == true ]]; then ghci "$FILE" - elif [[ $COMPILE == true ]]; then + fi + if [[ $COMPILE == true ]]; then ghc --make "$FILE" else runghc "$FILE" From 685a079d9ba6173d71610a003319bc49b6dd3c73 Mon Sep 17 00:00:00 2001 From: YoganshSharma <38936915+YoganshSharma@users.noreply.github.com> Date: Sat, 10 Dec 2022 12:23:34 +0530 Subject: [PATCH 12/12] Update run Co-authored-by: Arpit Bhardwaj --- run | 3 --- 1 file changed, 3 deletions(-) diff --git a/run b/run index 1ba46b1..d990e58 100755 --- a/run +++ b/run @@ -223,9 +223,6 @@ run() { runghc "$FILE" fi - if [[ $PERSISTENT != true ]]; then - rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}" - fi else _ERROR_UFTC_