forked from box-archived/vlive-backup-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-others.sh
59 lines (48 loc) · 1.02 KB
/
run-others.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
#!/bin/sh
PCOMMAND=python
# Check python version
# check python
PV0=`python --version`
PV0=${PV3:0:8}
if [ "$PV0" == "Python 3" ]; then
PCOMMAND=python
fi
# check python3
PV3=`python3 --version`
PV3=${PV3:0:8}
if [ "$PV3" == "Python 3" ]; then
PCOMMAND=python3
fi
if [ "$PCOMMAND" == "NONE" ]; then
clear
echo ===VLIVE-BACKUP-BOT===
echo Python 3.x not found
echo Please install python
echo
$PCOMMAND -m webbrowser https://www.python.org/downloads/
exit
fi
# Resize window
printf '\e[8;9;60t'
clear
echo
echo ======================VLIVE-BACKUP-BOT======================
echo
echo
echo " LOADING..."
echo
echo
echo ============================================================
# Move to shell dir
BASEDIR=$(dirname "$0")
cd "$BASEDIR"
if [ -d "venv" ]; then
rm -rf venv
fi
$PCOMMAND -m venv venv
./venv/bin/$PCOMMAND -m pip install -q -q -q --upgrade pip
./venv/bin/$PCOMMAND -m pip install -q -q -q -r requirements.txt
printf '\e[8;50;150t'
clear
./venv/bin/$PCOMMAND core.py
rm -rf venv