Print conficting script warning only if running in a terminal.
This commit is contained in:
parent
ffc7fe5f5b
commit
d7c2749ef5
@ -75,6 +75,14 @@ warn (){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn_only_terminal () {
|
||||||
|
if $terminal ; then
|
||||||
|
echo ""
|
||||||
|
echo -e "\t[ \033[33m\033[1mWarning\033[m ]: $*"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
info (){
|
info (){
|
||||||
if $terminal ; then
|
if $terminal ; then
|
||||||
echo ""
|
echo ""
|
||||||
@ -322,11 +330,9 @@ if [[ ${#CONFLICTING_SCRIPTS} -gt 0 ]] ; then
|
|||||||
|
|
||||||
if $_stop_running ; then
|
if $_stop_running ; then
|
||||||
|
|
||||||
echo ""
|
warn_only_terminal "\033[1m${_script_name}\033[m is currently running, but it conflicts with this script.
|
||||||
echo "[ Error ]: The \"${_script_name}\" script is currently running, but it conflicts with this script."
|
|
||||||
echo ""
|
Exiting now.."
|
||||||
echo " Exiting now.."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
clean_up 1
|
clean_up 1
|
||||||
|
|
||||||
|
@ -115,6 +115,14 @@ ok (){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn_only_terminal () {
|
||||||
|
if $terminal ; then
|
||||||
|
echo ""
|
||||||
|
echo -e "\t[ \033[33m\033[1mWarning\033[m ]: $*"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
blank_line() {
|
blank_line() {
|
||||||
if $terminal ; then
|
if $terminal ; then
|
||||||
echo ""
|
echo ""
|
||||||
@ -198,11 +206,9 @@ if [[ ${#CONFLICTING_SCRIPTS} -gt 0 ]] ; then
|
|||||||
|
|
||||||
if $_stop_running ; then
|
if $_stop_running ; then
|
||||||
|
|
||||||
echo ""
|
warn_only_terminal "\033[1m${_script_name}\033[m is currently running, but it conflicts with this script.
|
||||||
echo "[ Error ]: The \"${_script_name}\" script is currently running, but it conflicts with this script."
|
|
||||||
echo ""
|
Exiting now.."
|
||||||
echo " Exiting now.."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
clean_up 1
|
clean_up 1
|
||||||
|
|
||||||
|
@ -69,6 +69,14 @@ error (){
|
|||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn_only_terminal () {
|
||||||
|
if $terminal ; then
|
||||||
|
echo ""
|
||||||
|
echo -e "\t[ \033[33m\033[1mWarning\033[m ]: $*"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
warn (){
|
warn (){
|
||||||
echo ""
|
echo ""
|
||||||
if $terminal ; then
|
if $terminal ; then
|
||||||
@ -136,6 +144,13 @@ trim() {
|
|||||||
echo -n "$var"
|
echo -n "$var"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blank_line() {
|
||||||
|
if $terminal ; then
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------
|
#---------------------------------------
|
||||||
#-----------------------------
|
#-----------------------------
|
||||||
@ -224,11 +239,9 @@ if [[ ${#CONFLICTING_SCRIPTS} -gt 0 ]] ; then
|
|||||||
|
|
||||||
if $_stop_running ; then
|
if $_stop_running ; then
|
||||||
|
|
||||||
echo ""
|
warn_only_terminal "\033[1m${_script_name}\033[m is currently running, but it conflicts with this script.
|
||||||
echo "[ Error ]: The \"${_script_name}\" script is currently running, but it conflicts with this script."
|
|
||||||
echo ""
|
Exiting now.."
|
||||||
echo " Exiting now.."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
clean_up 1
|
clean_up 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user