-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdump-up.sh
More file actions
37 lines (27 loc) · 831 Bytes
/
dump-up.sh
File metadata and controls
37 lines (27 loc) · 831 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
# Let's Dump
# Setup
git config --global user.name "ImSpiDy"
git config --global user.email "SpiDy2713@gmail.com"
# login
if ! gh auth switch >/dev/null 2>&1; then
echo $gh_token > mytoken.txt # login in github
gh auth login --with-token < mytoken.txt
fi
# Dump folder
DUMP="$(basename "$1" .zip)"
rm -rf $DUMP-dump.zip
zip -r $DUMP-dump.zip $DUMP
gh release create $DUMP --generate-notes --repo https://github.com/ImSpiDy/Dumpyy.git
gh release upload --clobber $DUMP $DUMP-dump.zip --repo https://github.com/ImSpiDy/Dumpyy.git
# upload dump
cd $DUMP
git init
# Clean Junks
rm -rf boot modem
# Respect Github's file size limit
find $DUMP -type f -name "*.apk" -size +99M -print -delete
git add .
git commit -m "$DUMP"
git branch -M main
git remote add origin https://github.com/ImSpiDy/Dumpyy.git
git push -u origin main