forked from cameroncros/OctoPrint-DiscordRemote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test2.sh
27 lines (27 loc) · 831 Bytes
/
test2.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
#!/bin/bash
command -v py > /dev/null 2>&1
if [[ $? == 0 ]]; then
echo "Running in Windows"
PYTHON='python'
py -2 -m virtualenv testenv2
source testenv2/Scripts/activate
else
echo "Running in Linux"
PYTHON=python2
${PYTHON} -m virtualenv testenv2
source testenv2/bin/activate
fi
set -e
echo "Installing Pre-requisites"
${PYTHON} -m pip install -r requirements-dev.txt
echo "Installing Octoprint"
${PYTHON} -m pip install --upgrade --no-cache-dir git+https://github.com/foosel/OctoPrint.git@1.3.12
echo "Install DiscordRemote"
${PYTHON} setup.py develop
echo "Copy config"
cp testconfig testenv2/ -rfv
${PYTHON} configtest2.py
echo "Start browser"
${PYTHON} -m webbrowser -t http://127.0.0.1:5000
echo "Start Octoprint"
FAKE_SNAPSHOT=unittests/test_pattern.png octoprint serve -b testenv2/testconfig