Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ce0765c9
Commit
ce0765c9
authored
Feb 29, 2024
by
Rishikesh Nair
Committed by
Brad Davidson
Mar 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `RAW_OUTPUT` -> `NO_COLOR`
Also, if NO_COLOR is empty, output will be colored, otherwise not colored. Signed-off-by:
Rishikesh Nair
<
alienware505@gmail.com
>
parent
ff7cfa22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
check-config.sh
contrib/util/check-config.sh
+4
-8
No files found.
contrib/util/check-config.sh
View file @
ce0765c9
...
@@ -21,9 +21,6 @@ binDir=$(dirname "$0")
...
@@ -21,9 +21,6 @@ binDir=$(dirname "$0")
configFormat
=
gz
configFormat
=
gz
isError
=
0
isError
=
0
# RAW_OUTPUT=1 disables colored outputs
RAW_OUTPUT
=
${
RAW_OUTPUT
:-
0
}
if
[
$#
-gt
0
]
;
then
if
[
$#
-gt
0
]
;
then
CONFIG
=
"
$1
"
CONFIG
=
"
$1
"
fi
fi
...
@@ -58,6 +55,10 @@ is_set_as_module() {
...
@@ -58,6 +55,10 @@ is_set_as_module() {
}
}
color
()
{
color
()
{
if
[[
-n
"
$NO_COLOR
"
]]
;
then
return
fi
codes
=
codes
=
if
[
"
$1
"
=
'bold'
]
;
then
if
[
"
$1
"
=
'bold'
]
;
then
codes
=
1
codes
=
1
...
@@ -84,11 +85,6 @@ color() {
...
@@ -84,11 +85,6 @@ color() {
printf
'\033['
"
$codes
"
'm'
printf
'\033['
"
$codes
"
'm'
}
}
wrap_color
()
{
wrap_color
()
{
if
[
$RAW_OUTPUT
-eq
1
]
;
then
echo
-n
"
$1
"
return
fi
text
=
"
$1
"
text
=
"
$1
"
shift
shift
color
"
$@
"
color
"
$@
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment