-
Notifications
You must be signed in to change notification settings - Fork 5
/
termux.sh
100 lines (80 loc) · 2.96 KB
/
termux.sh
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!bin/bash
CYAN="\033[1;36m"
YELLOW="\033[1;33m"
PURPLE="\033[1;35m"
GREEN="\033[1;32m"
RED='\033[1;31m'
NC='\033[0m'
echo -e $GREEN"[$RED!$GREEN] Bem-vindo ao menu de edição do bot, escolha uma opção:"
echo -e $CYAN"1) Mover bot da home para sdcard"
echo -e $CYAN"2) Mover bot do sdcard para home"
echo -e $RED"3) Sair"
read opc
clear
if [ $opc == "1" ]; then
echo -e $YELLOW"Diga o nome da pasta do bot do sdcard (alastor-bot-md = 1)\n\nObs: A pasta do bot do sdcard deve ta na pasta Documents do sdcard"
read botsdcard
if [ -z "$botsdcard" ]; then
echo -e $RED"Nome de pasta vazia, saindo..."
exit
fi
if [ $botsdcard == "1" ]; then
botsdcard="alastor-bot-md"
fi
clear
echo -e $YELLOW"Diga o nome da pasta do bot da home (alastor-bot-md = 1)\n\nObs: A pasta do bot do sdcard deve ta na pasta Documents do sdcard"
read bothome
if [ -z "$bothome" ]; then
echo -e $RED"Nome de pasta vazia, saindo..."
exit
fi
if [ $bothome == "1" ]; then
bothome="alastor-bot-md"
fi
if [ ! -d "/sdcard/Documents/$botsdcard" ]; then
mkdir /sdcard/Documents/$botsdcard
mkdir /sdcard/Documents/$botsdcard/lib
mkdir /sdcard/Documents/$botsdcard/src
fi
cp -r $HOME/$bothome/src/* /sdcard/Documents/$botsdcard/src
cp -r $HOME/$bothome/lib/* /sdcard/Documents/$botsdcard/lib
cp $HOME/$bothome/README.md /sdcard/Documents/$botsdcard
cp $HOME/$bothome/config.js /sdcard/Documents/$botsdcard
cp $HOME/$bothome/index.js /sdcard/Documents/$botsdcard
cp $HOME/$bothome/install.sh /sdcard/Documents/$botsdcard
cp $HOME/$bothome/package.json /sdcard/Documents/$botsdcard
cp $HOME/$bothome/start.sh /sdcard/Documents/$botsdcard
cp $HOME/$bothome/update.js /sdcard/Documents/$botsdcard
cp $HOME/$bothome/LICENSE /sdcard/Documents/$botsdcard
echo -e $GREEN"Pasta do bot do home movida para /sdcard com sucesso!"
exit
elif [ $opc == "2" ]; then
echo -e $YELLOW"Diga o nome da pasta do bot do sdcard (alastor-bot-md = 1)\nObs: A pasta do bot do sdcard deve ta na pasta Documents do sdcard"
read botsdcard
if [ -z "$botsdcard" ]; then
echo -e $RED"Nome de pasta vazia, saindo..."
exit
fi
if [ $botsdcard == "1" ]; then
botsdcard="alastor-bot-md"
fi
clear
echo -e $YELLOW"Diga o nome da pasta do bot da home (alastor-bot-md = 1)\nObs: A pasta do bot do sdcard deve ta na pasta Documents do sdcard"
read bothome
if [ -z "$bothome" ]; then
echo -e $RED"Nome de pasta vazia, saindo..."
exit
fi
if [ $bothome == "1" ]; then
bothome="alastor-bot-md"
fi
if [ ! -d "/sdcard/Documents/$botsdcard" ]; then
mkdir /sdcard/Documents/$botsdcard
fi
cp -r /sdcard/Documents/$botsdcard/* $HOME/$bothome
echo -e $GREEN"Pasta do bot do /sdcard movida para o home com sucesso!"
exit
elif [ $opc == "3" ]; then
echo -e $RED"Saindo..."
exit
fi