Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
c6cf6813
Commit
c6cf6813
authored
Nov 24, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for work without tput, with uncompat tput, allow USETTY=0 for disable tput use
parent
52a445b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
epm-sh-functions
bin/epm-sh-functions
+6
-2
No files found.
bin/epm-sh-functions
View file @
c6cf6813
...
...
@@ -30,6 +30,10 @@ isatty()
check_tty
()
{
isatty
||
return
which tput
>
/dev/null 2>/dev/null
||
return
# FreeBSD does not support tput -S
echo
| tput
-S
>
/dev/null 2>/dev/null
||
return
[
-z
"
$USETTY
"
]
||
return
export
USETTY
=
1
}
...
...
@@ -37,7 +41,7 @@ check_tty()
set_boldcolor
()
{
[
-n
"
$USETTY
"
]
||
return
[
"
$USETTY
"
=
"1
"
]
||
return
{
echo
bold
echo
setaf
$1
...
...
@@ -46,7 +50,7 @@ set_boldcolor()
restore_color
()
{
[
-n
"
$USETTY
"
]
||
return
[
"
$USETTY
"
=
"1
"
]
||
return
{
echo
op
;
# set Original color Pair.
echo
sgr0
;
# turn off all special graphics mode (bold in our case).
...
...
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