Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,33 @@ 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
Comment thread
YoganshSharma marked this conversation as resolved.

elif [[ ${FILE#*.} == pl ]]; then
perl "$FILE"

elif [[ ${FILE#*.} == lua ]]; then
lua "$FILE"

elif [[ ${FILE#*.} == rb ]]; then
ruby "$FILE"

elif [[ ${FILE#*.} == hs ]]; then
if [[ $DEBUG == true ]]; then
ghci "$FILE"
fi
if [[ $COMPILE == true ]]; then
ghc --make "$FILE"
else
runghc "$FILE"
fi


else
_ERROR_UFTC_
_EXIT_
Expand Down Expand Up @@ -232,10 +252,14 @@ 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 " ${yellow}>>${white} Ruby"
echo " ${yellow}>>${white} Haskell ${cyan}[${white}with ${green}debug${white} support${cyan}]"
echo
;;

*".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go")
*".c" | *".cpp" | *".py" | *".rs" | *".java" | *".sh" | *".js" | *".go" | *".pl" | *".lua" | *".rb" | *".hs")
FILE_LOCATION=$arg
if [[ ! -f $FILE_LOCATION ]]; then
_ERROR_UFTC_
Expand Down