mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use tput for formatting escape sequences
This commit is contained in:
@@ -8,12 +8,16 @@ output=$(mktemp)
|
|||||||
errput=$(mktemp)
|
errput=$(mktemp)
|
||||||
rc=0
|
rc=0
|
||||||
|
|
||||||
|
bold=$(tput bold)
|
||||||
|
resbold=$(tput sgr0)
|
||||||
|
red=$(tput setaf 1)
|
||||||
|
rescolors=$(tput op)
|
||||||
tryDiff () {
|
tryDiff () {
|
||||||
diff -u --strip-trailing-cr $1 $2 || (echo -e "\033[1;31m${i%.asm}.$3$variant mismatch!\033[0;0m"; false)
|
diff -u --strip-trailing-cr $1 $2 || (echo -e "${bold}${red}${i%.asm}${variant}.$3 mismatch!${rescolors}${resbold}"; false)
|
||||||
}
|
}
|
||||||
|
|
||||||
tryCmp () {
|
tryCmp () {
|
||||||
cmp $1 $2 || (echo -e "\033[1;31m${i%.asm}.bin$variant mismatch!\033[0;0m"; false)
|
cmp $1 $2 || (echo -e "${bold}${red}${i%.asm}${variant}.out.bin mismatch!${rescolors}${resbold}"; false)
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in *.asm; do
|
for i in *.asm; do
|
||||||
|
|||||||
Reference in New Issue
Block a user