Skip to content

Commit d4da60a

Browse files
committed
[fix] : message output
1 parent 40b4597 commit d4da60a

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

allarch.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,37 +41,53 @@ umask 0022
4141
# Show an INFO message
4242
# $1: message string
4343
msg_info() {
44-
local _msg_opts="-a allarch.sh"
44+
local _msg_opts="-a build.sh"
45+
if [[ "${1}" = "-n" ]]; then
46+
_msg_opts="${_msg_opts} -o -n"
47+
shift 1
48+
fi
4549
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
4650
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
47-
"${script_path}/tools/msg.sh" ${_msg_opts} info "${@}"
51+
"${script_path}/tools/msg.sh" ${_msg_opts} info "${1}"
4852
}
4953

5054
# Show an Warning message
5155
# $1: message string
5256
msg_warn() {
53-
local _msg_opts="-a allarch.sh"
57+
local _msg_opts="-a build.sh"
58+
if [[ "${1}" = "-n" ]]; then
59+
_msg_opts="${_msg_opts} -o -n"
60+
shift 1
61+
fi
5462
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
5563
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
56-
"${script_path}/tools/msg.sh" ${_msg_opts} warn "${@}"
64+
"${script_path}/tools/msg.sh" ${_msg_opts} warn "${1}"
5765
}
5866

5967
# Show an debug message
6068
# $1: message string
6169
msg_debug() {
6270
if [[ "${debug}" = true ]]; then
63-
local _msg_opts="-a allarch.sh"
71+
local _msg_opts="-a build.sh"
72+
if [[ "${1}" = "-n" ]]; then
73+
_msg_opts="${_msg_opts} -o -n"
74+
shift 1
75+
fi
6476
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
6577
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
66-
"${script_path}/tools/msg.sh" ${_msg_opts} debug "${@}"
78+
"${script_path}/tools/msg.sh" ${_msg_opts} debug "${1}"
6779
fi
6880
}
6981

7082
# Show an ERROR message then exit with status
7183
# $1: message string
7284
# $2: exit code number (with 0 does not exit)
7385
msg_error() {
74-
local _msg_opts="-a allarch.sh"
86+
local _msg_opts="-a build.sh"
87+
if [[ "${1}" = "-n" ]]; then
88+
_msg_opts="${_msg_opts} -o -n"
89+
shift 1
90+
fi
7591
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
7692
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
7793
"${script_path}/tools/msg.sh" ${_msg_opts} error "${1}"

0 commit comments

Comments
 (0)