You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash# ANSI color codes
RED=$(tput setaf 1)
ORANGE=$(tput setaf 3)
NC=$(tput sgr0)# The working directory is the same directory where this script is located
workspaceRoot="$(cd"$( dirname "${BASH_SOURCE[0]}")"&&pwd)"processFile() {
file="$1"# Print the name of the file being processedecho -e "Processing file: $file"# Run the compiler and color-code the output"$workspaceRoot/amxxpc""-d2""$file"2>&1| \
sed -e "s/\(.*error.*\)/${RED}\1${NC}/" \
-e "s/\(.*warning.*\)/${ORANGE}\1${NC}/"
}
# If no command line arguments are provided, process all .sma filesif [ "$1"=="" ];thenforfilein"$workspaceRoot"/*.sma;do
processFile "$file"doneread -p "Press Enter to continue..."else# For each command line argumentforfilein"$@";do
processFile "$file"donefi
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: