Skip to content

Commit 4125e54

Browse files
committed
Refactor term check into function (CC #34)
1 parent 57be00c commit 4125e54

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

linuxdeploy-plugin-conda.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ show_usage() {
2323
echo " ARCH=\"x86_64\" (further supported values: i686)"
2424
}
2525

26+
isterm() {
27+
return [[ "$TERM" != "" ]];
28+
}
29+
2630
log() {
27-
[[ "$TERM" != "" ]] && tput setaf 3
28-
[[ "$TERM" != "" ]] && tput bold
31+
_isterm && tput setaf 3
32+
_isterm && tput bold
2933
echo -*- "$@"
30-
[[ "$TERM" != "" ]] && tput sgr0
34+
_isterm && tput sgr0
3135
}
3236

3337
APPDIR=

0 commit comments

Comments
 (0)