-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathupdate
More file actions
executable file
·60 lines (57 loc) · 2.42 KB
/
Copy pathupdate
File metadata and controls
executable file
·60 lines (57 loc) · 2.42 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
msg() {
local colors="/etc/new-cr4r-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;36m' #MAG='\033[1;36m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1) COLOR[$COL]='\033[1;37m' ;;
2) COLOR[$COL]='\e[31m' ;;
3) COLOR[$COL]='\e[32m' ;;
4) COLOR[$COL]='\e[33m' ;;
5) COLOR[$COL]='\e[34m' ;;
6) COLOR[$COL]='\e[35m' ;;
7) COLOR[$COL]='\033[1;36m' ;;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-bra) cor="${COLOR[0]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-bar) cor="${COLOR[4]}——————————————————————————————————————————————————————" && echo -e "${SEMCOR}${cor}${SEMCOR}" ;;
-bar2) cor="${COLOR[4]}——————————————————————————————————————————————————————" && echo -e "${SEMCOR}${cor}${SEMCOR}\n\t${2}\n${SEMCOR}${cor}${SEMCOR}" ;;
esac
}
msg -bar2 "Backup dari local"
msg -ama "cp -r /etc/ger-frm/* /root/ssh/request"
cp -r /etc/ger-frm/* /root/ssh/request
msg -ama "cp -r /etc/cr4r/user/usercodes /root/ssh/request/usercodes"
cp -r /etc/cr4r/user/usercodes /root/ssh/request/usercodes
msg -ama "cp -r /etc/cr4r/pesan.txt /root/ssh/request/pesan.txt"
cp -r /etc/cr4r/pesan.txt /root/ssh/request/pesan.txt
msg -ama "cp -r /etc/cr4r/menu /root/ssh/request/menu"
cp -r /etc/cr4r/menu /root/ssh/request/menu
msg -ama "cp -r /etc/inst/* /root/ssh/request"
cp -r /etc/inst/* /root/ssh/request
tput cuu1 && tput dl1
msg -bar2 "Update ke githup"
git add .
git checkout main
git commit -m "$@"
git push
msg -bar