-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutil.sh
More file actions
38 lines (30 loc) · 881 Bytes
/
Copy pathutil.sh
File metadata and controls
38 lines (30 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# ###########################################################
# printing with colors
# ###########################################################
ESC_SEQ=$'\033['
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
COL_CYAN=$ESC_SEQ"36;01m"
function ok() {
printf '%b[ok]%b %s\n' "$COL_GREEN" "$COL_RESET" "$*"
}
function bot() {
printf '\n%b[._.]%b - %s\n' "$COL_GREEN" "$COL_RESET" "$*"
}
function running() {
printf '%b=>%b %s: ' "$COL_YELLOW" "$COL_RESET" "$*"
}
function action() {
printf '\n%b[action]:%b\n => %s...\n' "$COL_YELLOW" "$COL_RESET" "$*"
}
function warn() {
printf '%b[warning]%b %s\n' "$COL_YELLOW" "$COL_RESET" "$*"
}
function error() {
printf '%b[error]%b %s\n' "$COL_RED" "$COL_RESET" "$*"
}