forked from D4Darinda/ArrayCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayCore
More file actions
43 lines (38 loc) · 1.18 KB
/
ArrayCore
File metadata and controls
43 lines (38 loc) · 1.18 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
#!/bin/bash
_get_repolink () {
local regex
regex='(https?)://github.com/.+/.+'
if [[ $ARRAY_REPO == "ArrayCore" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1IZWxsQm90L0FycmF5Q29yZS9hcmNoaXZlL21haW4uemlw" | base64 -d
elif [[ $ARRAY_REPO == "ArrayCore" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1IZWxsQm90L0FycmF5Q29yZS9hcmNoaXZlL21haW4uemlw" | base64 -d
elif [[ $ARRAY_REPO =~ $regex ]]
then
if [[ $ARRAY_REPO_BRANCH ]]
then
echo "${ARRAY_REPO}/archive/${ARRAY_REPO_BRANCH}.zip"
else
echo "${ARRAY_REPO}/archive/main.zip"
fi
else
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1IZWxsQm90L0FycmF5Q29yZS9hcmNoaXZlL21haW4uemlw" | base64 -d
fi
}
_set_bot () {
local zippath
zippath="ArrayCore.zip"
echo "• Downloading Data •"
wget -q $(_get_repolink) -O "$zippath"
arraypath=$(zipinfo -1 "$zippath" | grep -v "/.");
unzip -qq "$zippath"
echo "• Done •"
rm -rf "$zippath"
sleep 5
cd $arraypath
echo "••• Starting ArrayCore ••• "
python3 ../setup/updater.py ../requirements.txt requirements.txt
python3 -m ArrayCore
}
_set_bot