2022-08-11 20:57:16 +10:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-08-24 12:01:07 +10:00
|
|
|
TRUE=0;
|
|
|
|
FALSE=1;
|
2022-08-11 20:57:16 +10:00
|
|
|
|
|
|
|
ERROR_COLOR='\033[0;31m';
|
|
|
|
HIGHLIGHT_COLOR='\033[0;32m';
|
|
|
|
INPUT_COLOR='\033[0;33m';
|
|
|
|
NO_COLOR='\033[0m';
|
|
|
|
|
|
|
|
|
|
|
|
function print_highlight() {
|
|
|
|
printf "${HIGHLIGHT_COLOR}$1${NO_COLOR}\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
function print_error() {
|
|
|
|
printf "${ERROR_COLOR}$1${NO_COLOR}\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
function input() {
|
|
|
|
read -p "$(echo -e ${INPUT_COLOR}$1 ${NO_COLOR})" $2
|
2022-08-24 12:01:07 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
function prompt_continue() {
|
|
|
|
read -p "Continue N/(Y)?" is_continue
|
|
|
|
if [[ "${is_continue}" == "N" || "${is_continue}" == "n" ]]; then
|
|
|
|
return $FALSE;
|
|
|
|
fi
|
|
|
|
|
|
|
|
return $TRUE;
|
2022-08-11 20:57:16 +10:00
|
|
|
}
|