mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
9dae851a9c
* first! * folders * break out colors * home * seperate update * breakout pull * move file * breakout push * breakout smart * restore breakout * include restore * breakout logs validate ssh * breakout config exit intent * source exit * breakout backup automation and purge * breakout root * file headers * create push pull restore smart functions * consolidate options * include root check * includes * includes 2 * automate * rearrange imports * header * ssh rsync * new install steps * ticks * yellow * host check * check for git * ticks * check for pihole * check sudo powers * create sudo file * write output * pihole directory * install sudo file * purge error message * comment cleanup * installer * header * instructions * l * read p * header * skip prompts * sudo no longer in config * compare exit code * exit with change * 3.0 Co-authored-by: Michael Stanclift <vmstan@Sovereign.vmstan.net> Co-authored-by: Michael Stanclift <vmstan@Sovereign.local>
54 lines
1.0 KiB
Bash
54 lines
1.0 KiB
Bash
# GRAVITY SYNC BY VMSTAN #####################
|
|
# gs-colors.sh ###############################
|
|
|
|
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
|
|
# This code is called from the main gravity-sync.sh file and should not execute directly!
|
|
|
|
## Script Colors
|
|
RED='\033[0;91m'
|
|
GREEN='\033[0;92m'
|
|
CYAN='\033[0;96m'
|
|
YELLOW='\033[0;93m'
|
|
PURPLE='\033[0;95m'
|
|
BLUE='\033[0;94m'
|
|
BOLD='\033[1m'
|
|
NC='\033[0m'
|
|
|
|
## Message Codes
|
|
FAIL="[${RED}✗${NC}]"
|
|
WARN="[${PURPLE}!${NC}]"
|
|
GOOD="[${GREEN}✓${NC}]"
|
|
STAT="[${CYAN}e${NC}]"
|
|
INFO="[${YELLOW}i${NC}]"
|
|
NEED="[${BLUE}?${NC}]"
|
|
|
|
## Echo Stack
|
|
### Informative
|
|
function echo_info {
|
|
echo -e "${INFO} ${YELLOW}${MESSAGE}${NC}"
|
|
}
|
|
|
|
### Warning
|
|
function echo_warn {
|
|
echo -e "${WARN} ${PURPLE}${MESSAGE}${NC}"
|
|
}
|
|
|
|
### Executing
|
|
function echo_stat {
|
|
echo -en "${STAT} ${MESSAGE}"
|
|
}
|
|
|
|
### Success
|
|
function echo_good {
|
|
echo -e "\r${GOOD} ${MESSAGE}"
|
|
}
|
|
|
|
### Failure
|
|
function echo_fail {
|
|
echo -e "\r${FAIL} ${MESSAGE}"
|
|
}
|
|
|
|
### Request
|
|
function echo_need {
|
|
echo -en "${NEED} ${MESSAGE}: "
|
|
} |