-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon.lib
79 lines (66 loc) · 2.12 KB
/
common.lib
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# common.lib
#
# ver 0.1.0
# Modified: 26-05-2020
# Essential files
BOT="YERTE"
ESSFILE="run.sh nightrun.sh common.lib cabals.sh"
CDN="https://cabals.web.app"
DEF="\e[0m"
ULINE="\e[4m"
CDEF="\e[39m"
LCYAN="\e[96m"
LGREN="\e[92m"
LRED="\e[91m"
INV="\e[7m"
BOLD="\e[1m"
# isi 1 baris kosong
function f1baris() {
printf "\n"
}
# isi 2 baris kosong
function f2baris() {
printf "\n\n"
}
# wget file dari url
function flogo() {
echo -e "\n${LRED}"
printf " ▄████▄ ▄▄▄ ▄▄▄▄ ▄▄▄ ██▓ " && f1baris
printf "▒██▀ ▀█ ▒████▄ ▓█████▄ ▒████▄ ▓██▒ " && f1baris
printf "▒▓█ ▄▒██ ▀█▄ ▒██▒ ▄██▒██ ▀█▄ ▒██░ " && f1baris
printf "▒▓▓▄ ▄██░██▄▄▄▄██ ▒██░█▀ ░██▄▄▄▄██▒██░ " && f1baris
printf "▒ ▓███▀ ▓█ ▓██▒░▓█ ▀█▓ ▓█ ▓██░██████" && f1baris
printf "░ ░▒ ▒ ▒▒ ▓▒█░░▒▓███▀▒ ▒▒ ▓▒█░ ▒░▓ " && f1baris
printf " ░ ▒ ░ ▒▒ ░▒░▒ ░ ░ ▒▒ ░ ░ ▒ " && f1baris
printf "░ ░ ▒ ░ ░ ░ ▒ ░ ░ " && f1baris
printf "░ ░ ░ ░ ░ ░ ░ " && echo -e "${CDEF}\n\n"
}
# wget file dari url
function fwget() {
sudo wget -q https://erol.my.id/$1
}
# bye dari Cortana waktu exit
function fbye() {
echo -e "${LCYAN}[${BOT}]:${CDEF} Bye."
}
# buat file bisa dieksekusi
function fchmodx() {
sudo chmod +x $1
}
# bye dari Cortana waktu exit
function fselesai() {
echo -e "${LGREN}✔ ${ULINE}SELESAI.${DEF}${CDEF}"
}
# hapus files asal
function frmfile() {
rm -fR $FILE
}
# hapus related files saat keluar
function frmall() {
rm -fR $FILE $ESSFILE
}
# deteksi nama distro
function catdistro() {
CATOS=$(sudo cat /etc/os-release | grep -w ID | cut -d '=' -f 2)
CATOSx=$(sudo cat /etc/os-release | grep -w ID | cut -d '"' -f 2)
}