Standby messages

This commit is contained in:
Bob Mottram 2017-06-11 10:43:35 +01:00
parent c01783b518
commit a6f960d580
2 changed files with 32 additions and 0 deletions

View File

@ -42,6 +42,22 @@ if [ -f /usr/bin/${PROJECT_NAME} ]; then
PROJECT_INSTALL_DIR=/usr/bin
fi
function please_wait {
local str width height length
width=$(tput cols)
height=$(tput lines)
str="Standby to backup to USB"
length=${#str}
clear
tput cup $((height / 2)) $(((width / 2) - (length / 2)))
echo "$str"
tput cup $((height * 3 / 5)) $(((width / 2)))
echo -n ''
}
please_wait
source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
# include utils which allow function_check and drive mount

View File

@ -44,6 +44,22 @@ if [ -f /usr/bin/${PROJECT_NAME} ]; then
PROJECT_INSTALL_DIR=/usr/bin
fi
function please_wait {
local str width height length
width=$(tput cols)
height=$(tput lines)
str="Standby to restore from USB"
length=${#str}
clear
tput cup $((height / 2)) $(((width / 2) - (length / 2)))
echo "$str"
tput cup $((height * 3 / 5)) $(((width / 2)))
echo -n ''
}
please_wait
source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
# include utils which allow function_check, go and drive mount