stopped writing {GRAY} before each message in myprint()

This commit is contained in:
Timerix 2025-11-12 14:33:22 +05:00
parent 5cc2e1c2ad
commit e655f05da6
4 changed files with 9 additions and 6 deletions

View File

@ -45,7 +45,7 @@ include "@cbuild/include/functions.sh"
include "@cbuild/include/config.sh"
function print_help {
myprint "cbuild v$INSTALLED_CBUILD_VERSION"
myprint "${GRAY}cbuild v$INSTALLED_CBUILD_VERSION"
myprint "C/C++ project build system written in bash."
myprint "Usage: cbuild [OPTIONS] [TASKS]"
myprint "Options:"
@ -74,7 +74,7 @@ do
exit 0
;;
'-v' | '--version')
myprint "cbuild v$INSTALLED_CBUILD_VERSION"
myprint "${GRAY}cbuild v$INSTALLED_CBUILD_VERSION"
exit 0
;;
'-c' | '--config')

View File

@ -4,7 +4,6 @@ include "@cbuild/include/myprint.sh"
function detect_os {
local uname_result="$(uname -o)"
# myprint "uname result: '$uname_result'"
case "$uname_result" in
Msys | Cygwin | MS/Windows)
safeprint WINDOWS

View File

@ -233,7 +233,9 @@ function pack_static_lib {
fi
local command="ar rcs $OUTDIR/$outfile $objects"
myprint "$command"
print_hline "${GRAY}" "─"
myprint "${GRAY}$command"
print_hline "${GRAY}" "─"
if $command
then
myprint "${GREEN}file $CYAN$outfile ${GREEN}created"
@ -268,7 +270,9 @@ function link {
done
local command="$CMP_CPP $objects $static_libs $args $dynamic_libs_args -o $OUTDIR/$outfile"
myprint "$command"
print_hline "${GRAY}" "─"
myprint "${GRAY}$command"
print_hline "${GRAY}" "─"
if $command
then
myprint "${GREEN}file $CYAN$outfile ${GREEN}created"

View File

@ -18,7 +18,7 @@ function safeprint {
# prints text with special characters and resets color
function myprint {
printf "${GRAY}$@${GRAY}\n"
printf "$@${GRAY}\n"
}
function myprint_quiet {