-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.sh
More file actions
37 lines (30 loc) · 820 Bytes
/
common.sh
File metadata and controls
37 lines (30 loc) · 820 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
GREEN="\e[1m\e[1;32m" # green color
RED="\e[1m\e[1;31m" # red color
BLUE='\033[0;34m' # blue color
YELLOW="\e[1m\e[1;33m" # yellow color
NC="\e[0m" # no color
function printLogo {
bash <(curl -s https://raw.githubusercontent.com/UnityNodes/scripts/refs/heads/main/logo.sh)
}
function printLine {
echo "------------------------------------------------------------------------------------"
}
function printGreen {
echo -e "${GREEN}${1}${NC}"
}
function printRed {
echo -e "${RED}${1}${NC}"
}
function printBlue {
echo -e "${BLUE}${1}${NC}"
}
function printYellow {
echo -e "${YELLOW}${1}${NC}"
}
function addToPath {
source $HOME/.bash_profile
PATH_EXIST=$(grep "${1}" $HOME/.bash_profile)
if [ -z "$PATH_EXIST" ]; then
echo "export PATH=\$PATH:${1}" >> $HOME/.bash_profile
fi
}