wip
This commit is contained in:
parent
4cfbe03bae
commit
fc99969966
1 changed files with 54 additions and 6 deletions
60
distros.sh
60
distros.sh
|
@ -18,27 +18,75 @@ opensuse="false"
|
||||||
# BOLD='\033[1m'
|
# BOLD='\033[1m'
|
||||||
# NC='\033[0m' # No Color
|
# NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# Basic Colors
|
||||||
|
BLACK=$'\e[30m'
|
||||||
RED=$'\e[31m'
|
RED=$'\e[31m'
|
||||||
GREEN=$'\e[32m'
|
GREEN=$'\e[32m'
|
||||||
YELLOW=$'\e[33m'
|
YELLOW=$'\e[33m'
|
||||||
BLUE=$'\e[34m'
|
BLUE=$'\e[34m'
|
||||||
|
MAGENTA=$'\e[35m'
|
||||||
|
CYAN=$'\e[36m'
|
||||||
|
WHITE=$'\e[37m'
|
||||||
|
|
||||||
|
# Bright Colors
|
||||||
|
BRIGHT_BLACK=$'\e[90m'
|
||||||
|
BRIGHT_RED=$'\e[91m'
|
||||||
|
BRIGHT_GREEN=$'\e[92m'
|
||||||
|
BRIGHT_YELLOW=$'\e[93m'
|
||||||
|
BRIGHT_BLUE=$'\e[94m'
|
||||||
|
BRIGHT_MAGENTA=$'\e[95m'
|
||||||
|
BRIGHT_CYAN=$'\e[96m'
|
||||||
|
BRIGHT_WHITE=$'\e[97m'
|
||||||
|
|
||||||
|
# Background Colors (standard)
|
||||||
|
BG_BLACK=$'\e[40m'
|
||||||
|
BG_RED=$'\e[41m'
|
||||||
|
BG_GREEN=$'\e[42m'
|
||||||
|
BG_YELLOW=$'\e[43m'
|
||||||
|
BG_BLUE=$'\e[44m'
|
||||||
|
BG_MAGENTA=$'\e[45m'
|
||||||
|
BG_CYAN=$'\e[46m'
|
||||||
|
BG_WHITE=$'\e[47m'
|
||||||
|
|
||||||
|
# Background Bright Colors
|
||||||
|
BG_BRIGHT_BLACK=$'\e[100m'
|
||||||
|
BG_BRIGHT_RED=$'\e[101m'
|
||||||
|
BG_BRIGHT_GREEN=$'\e[102m'
|
||||||
|
BG_BRIGHT_YELLOW=$'\e[103m'
|
||||||
|
BG_BRIGHT_BLUE=$'\e[104m'
|
||||||
|
BG_BRIGHT_MAGENTA=$'\e[105m'
|
||||||
|
BG_BRIGHT_CYAN=$'\e[106m'
|
||||||
|
BG_BRIGHT_WHITE=$'\e[107m'
|
||||||
|
|
||||||
|
# Styles
|
||||||
BOLD=$'\e[1m'
|
BOLD=$'\e[1m'
|
||||||
NC=$'\e[0m'
|
ITALIC=$'\e[3m'
|
||||||
|
UNDERLINE=$'\e[4m'
|
||||||
|
BLINK=$'\e[5m' # May not work in all terminals
|
||||||
|
INVERT=$'\e[7m' # Invert foreground/background
|
||||||
|
STRIKE=$'\e[9m' # Strikethrough
|
||||||
|
|
||||||
|
# Reset
|
||||||
|
NC=$'\e[0m' # Reset all styles/colors
|
||||||
|
|
||||||
echo_error() {
|
echo_error() {
|
||||||
echo "${BOLD}${RED}ERROR: ${NC}${RED} $1 ${NC}\n" >&2
|
echo "${BOLD}${RED}${UNDERLINE}ERROR:${NC}${RED} $1 ${NC}" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
echo_pkg() {
|
||||||
|
echo "${BOLD}${BRIGHT_CYAN}PGK:${NC}${BLUE} $1 ${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_info() {
|
echo_info() {
|
||||||
echo "${BOLD}${BLUE}INFO: ${NC}${BLUE} $1 ${NC}\n"
|
echo "${BOLD}${BLUE}INFO:${NC}${BLUE} $1 ${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_warning() {
|
echo_warning() {
|
||||||
echo "${BOLD}${YELLOW}WARNING: ${NC}${YELLOW} $1 ${NC}\n"
|
echo "${BOLD}${YELLOW}WARNING: ${NC}${YELLOW} $1 ${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_note() {
|
echo_note() {
|
||||||
echo "${BOLD}${GREEN}NOTE: ${NC}${GREEN} $1 ${NC}\n"
|
echo "${BOLD}${GREEN}NOTE: ${NC}${GREEN} $1 ${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||||
|
@ -71,7 +119,7 @@ checkAndInstall() {
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# ─< else go though the list of items and do the same >───────────────────────────────────
|
# ─< else go though the list of items and do the same >───────────────────────────────────
|
||||||
echo "${YELLOW} Installing package group - ${RED} $@ ${NC}"
|
echo "${YELLOW}Installing package group - ${RED} $@ ${NC}"
|
||||||
for deps in "${@}"; do
|
for deps in "${@}"; do
|
||||||
echo_info "Installing $deps"
|
echo_info "Installing $deps"
|
||||||
if ! command_exists $deps; then
|
if ! command_exists $deps; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue