-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbashrc.sh
201 lines (159 loc) · 3.71 KB
/
bashrc.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#!/data/data/com.termux/files/usr/bin/bash
export PATH="$PREFIX/bin:$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PREFIX/glibc/bin:$HOME/.cargo/bin"
export CLASSPATH="$PREFIX/lib/antlr-4.13.2-complete.jar"
export GOROOT="$PREFIX/lib/go"
export GOPATH="$HOME/go"
export TORPATH="$PREFIX/etc/tor"
export PDROOTFS="$PREFIX/var/lib/proot-distro/installed-rootfs"
alias antlr4='java -jar $PREFIX/lib/antlr-4.13.2-complete.jar'
alias grun='java org.antlr.v4.runtime.misc.TestRig'
alias src=source
gitPull() {
for dir in */ ; do
if [ -d "$dir/.git" ]; then
cd "$dir" || continue
git pull
cd ..
fi
done
}
gacp() {
git add .
git commit -m "$1"
git push origin "$2"
}
torchk() {
battery_status=$(termux-battery-status)
is_charging=$(echo "$battery_status" | grep -o '"status": "CHARGING"')
if [[ $is_charging == *"CHARGING"* ]]; then
pkill -f "^tor$"
echo 'CHARGING'
fi
}
torchr() {
battery_status=$(termux-battery-status)
is_charging=$(echo "$battery_status" | grep -o '"status": "CHARGING"')
if [[ $is_charging == *"CHARGING"* ]]; then
echo 'CHARGING'
else
tor &
fi
}
torch() {
battery_status=$(termux-battery-status)
is_charging=$(echo "$battery_status" | grep -o '"status": "CHARGING"')
if [[ $is_charging == *"CHARGING"* ]]; then
pkill -f "^tor$"
echo 'CHARGING'
else
tor &
fi
}
mvic() {
mv "/storage/emulated/0/Download/$1" .
}
cpic() {
cp "/storage/emulated/0/Download/$1" .
}
cpric() {
cp -r "/storage/emulated/0/Download/$1" .
}
mvoc() {
mv "$1" "/storage/emulated/0/Download"
}
cpoc() {
cp "$1" "/storage/emulated/0/Download"
}
cproc() {
cp -r "$1" "/storage/emulated/0/Download"
}
mvid() {
mv "/storage/emulated/0/Download/$2" "/data/data/com.termux/files/home/debian$1/debian-fs/root/"
}
cpid() {
cp "/storage/emulated/0/Download/$2" "/data/data/com.termux/files/home/debian$1/debian-fs/root/"
}
cprid() {
cp -r "/storage/emulated/0/Download/$2" "/data/data/com.termux/files/home/debian$1/debian-fs/root/"
}
mvod() {
mv "/data/data/com.termux/files/home/debian$1/debian-fs/root/$2" "/storage/emulated/0/Download/"
}
cpod() {
cp "/data/data/com.termux/files/home/debian$1/debian-fs/root/$2" "/storage/emulated/0/Download/"
}
cprod() {
cp -r "/data/data/com.termux/files/home/debian$1/debian-fs/root/$2" "/storage/emulated/0/Download/"
}
mvip() {
mv "/storage/emulated/0/Download/$2" "$PREFIX/var/lib/proot-distro/installed-rootfs/$1/root"
}
cpip() {
cp "/storage/emulated/0/Download/$2" "$PREFIX/var/lib/proot-distro/installed-rootfs/$1/root"
}
cprip() {
cp -r "/storage/emulated/0/Download/$2" "$PREFIX/var/lib/proot-distro/installed-rootfs/$1/root"
}
mvop() {
mv "$PREFIX/var/lib/proot-distro/installed-rootfs/$1/root/$2" "/storage/emulated/0/Download/"
}
cpop() {
cp "$PREFIX/var/lib/proot-distro/installed-rootfs/$1/root/$2" "/storage/emulated/0/Download/"
}
cprop() {
cp -r "$PREFIX/var/lib/proot-distro/installed-rootfs/$1/root/$2" "/storage/emulated/0/Download/"
}
mvipd() {
mvip debian "$1"
}
cpipd() {
cpip debian "$1"
}
cpripd() {
cprip debian "$1"
}
mvopd() {
mvop debian "$1"
}
cpopd() {
cpop debian "$1"
}
cpropd() {
cprop debian "$1"
}
mvipu() {
mvip ubuntu "$1"
}
cpipu() {
cpip ubuntu "$1"
}
cpripu() {
cprip ubuntu "$1"
}
mvopu() {
mvop ubuntu "$1"
}
cpopu() {
cpop ubuntu "$1"
}
cpropu() {
cprop ubuntu "$1"
}
mvipdb() {
mvip debianbox "$1"
}
cpipdb() {
cpip debianbox "$1"
}
cpripdb() {
cprip debianbox "$1"
}
mvopdb() {
mvop debianbox "$1"
}
cpopdb() {
cpop debianbox "$1"
}
cpropdb() {
cprop debianbox "$1"
}