-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest_mod.sh
More file actions
executable file
·36 lines (34 loc) · 867 Bytes
/
test_mod.sh
File metadata and controls
executable file
·36 lines (34 loc) · 867 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
#!/bin/bash
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release 2>/dev/null
OS=$NAME
VER=$VERSION_ID
if uname -a | grep -Fq "WSL" 2> /dev/null; then
SUB_SYSTEM="WSL"
fi
elif type lsb_release >/dev/null 2>&1; then
# linuxbase.org
OS=$(lsb_release -si)
VER=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
# For some versions of Debian/Ubuntu without lsb_release command
. /etc/lsb-release
OS=$DISTRIB_ID
VER=$DISTRIB_RELEASE
fi
if [[ "$OS" == "Arch Linux" ]]; then
echo "Arch Linux"
pip uninstall fhem --break-system-packages
else
echo "OS: $OS"
pip uninstall fhem
fi
./publish.sh
if [[ "$OS" == "Arch Linux" ]]; then
pip install fhem/dist/fhem-0.7.0.tar.gz --break-system-packages
else
pip install fhem/dist/fhem-0.7.0.tar.gz
fi
cd selftest
python selftest.py