Files
kazewp/lib/colors.sh
T
10h30 501d29cad7 Add logging function with improved output formatting
- Introduced a log() function to capture console output to a file
- Added date separator and blank lines for better readability
- Stripped ANSI color codes to avoid strange characters in the log
2025-01-04 19:47:31 +09:00

13 lines
263 B
Bash

if [ -t 1 ]; then
# Terminal supports colors
NC='\033[0m' # No Color
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
else
# Disable colors for non-terminal outputs (like logs)
NC=''
RED=''
GREEN=''
BLUE=''
fi