mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-19 23:46:02 +01:00
download graphic installer if DISPLAY
This commit is contained in:
parent
96a46f36c2
commit
e6a40e622c
18
installer.sh
18
installer.sh
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# © 2022 Harald Barth
|
# © 2022,2023 Harald Barth
|
||||||
#
|
#
|
||||||
# This file is part of CommandStation-EX
|
# This file is part of CommandStation-EX
|
||||||
#
|
#
|
||||||
@ -29,14 +29,28 @@ ACLI="./bin/arduino-cli"
|
|||||||
|
|
||||||
function need () {
|
function need () {
|
||||||
type -p $1 > /dev/null && return
|
type -p $1 > /dev/null && return
|
||||||
|
dpkg -l $1 2>&1 | egrep ^ii >/dev/null && return
|
||||||
sudo apt-get install $1
|
sudo apt-get install $1
|
||||||
type -p $1 > /dev/null && return
|
type -p $1 > /dev/null && return
|
||||||
echo "Could not install $1, abort"
|
echo "Could not install $1, abort"
|
||||||
exit 255
|
exit 255
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
need git
|
need git
|
||||||
|
|
||||||
|
if [ x$DISPLAY != x ] ; then
|
||||||
|
# we have DISPLAY, do the graphic thing
|
||||||
|
need python3-tk
|
||||||
|
need python3.8-venv
|
||||||
|
mkdir -p ~/ex-installer/venv
|
||||||
|
python3 -m venv ~/ex-installer/venv
|
||||||
|
cd ~/ex-installer/venv || exit 255
|
||||||
|
source ./bin/activate
|
||||||
|
git clone https://github.com/DCC-EX/EX-Installer
|
||||||
|
cd EX-Installer || exit 255
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
exec python3 -m ex_installer
|
||||||
|
fi
|
||||||
if test -d `basename "$DCCEXGITURL"` ; then
|
if test -d `basename "$DCCEXGITURL"` ; then
|
||||||
: assume we are almost there
|
: assume we are almost there
|
||||||
cd `basename "$DCCEXGITURL"` || exit 255
|
cd `basename "$DCCEXGITURL"` || exit 255
|
||||||
|
Loading…
Reference in New Issue
Block a user