forked from TaBy2/Beach
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbeach
More file actions
49 lines (41 loc) · 1.19 KB
/
beach
File metadata and controls
49 lines (41 loc) · 1.19 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
#!/bin/bash
if [ "$(whoami)" != "root" ] && [[ "$(whoami)" != *"u0"* ]]; then
echo "Failed to execute: root permission needed"
exit
fi
if [ $# -eq 0 ]; then
printf "Usage: beach <command>\n\tedit\t\tEdit source code\n\tfetchstickerid\tStart Sticker ID Fetcher\n\tremove\t\tRemove Tyfe from the machine\n\tresettoken\tReset all token cache\n\tsidfedit\tEdit Sticker ID Fetcher source code\n\tstart\t\tStart Tyfe\n\tupdate\t\tUpdate Tyfe to the latest version\n\tversion\t\tPrint the current version\n\n"
exit
fi
if [ "$1" = "edit" ]; then
nano /etc/beach-noxt/line.py
exit
fi
if [ "$1" = "remove" ]; then
echo "Removing..."
rm -rf /etc/beach-noxt/
rm /usr/bin/beach-noxt
printf "Done!\n\n"
exit
fi
if [ "$1" = "resettoken" ]; then
echo "Resetting.."
cd /etc/beach/
python3 line.py "reset"
printf "Done!\n\n"
exit
fi
if [ "$1" = "start" ]; then
cd /etc/beach-noxt/
python3 line.py
exit
fi
if [ "$1" = "update" ]; then
echo "Updating By beach..."
cd /tmp/
git clone https://gitlab.com/beach-noxtian-01/beach-noxt &> /dev/null
noxtian/install.sh
rm -rf /tmp/noxtina
exit
fi
echo "Failed to execute: Unknown command"