From 0dcf1618625168cc92e67c0ea385a589cd989e10 Mon Sep 17 00:00:00 2001 From: Holger Cremer Date: Sat, 15 Sep 2018 19:46:44 +0200 Subject: makes tmux call at the end optional --- docker/README.md | 2 +- docker/init.sh | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index ac22919..77d375c 100644 --- a/docker/README.md +++ b/docker/README.md @@ -17,7 +17,7 @@ Run the image with: # change into the "serial-barcode-scanner" directory cd .. -docker run --rm -it -p 8080:8080 -v "$PWD":/mnt/serial-barcode-scanner sbs-build +docker run --rm -it -p 8080:8080 -v "$PWD":/mnt/serial-barcode-scanner sbs-build tmux ``` You have now a tmux terminal to work with the vala files and run the program. diff --git a/docker/init.sh b/docker/init.sh index bcd6f6b..c44e674 100755 --- a/docker/init.sh +++ b/docker/init.sh @@ -3,7 +3,16 @@ export LD_LIBRARY_PATH=/mnt/serial-barcode-scanner/libcairobarcode dbus-daemon --system + dpkg-buildpackage -b -nc && \ apt install -y --no-install-recommends ./../shopsystem_*_amd64.deb && \ - cp /root/config.ini /etc/shopsystem/config.ini && \ + cp /root/config.ini /etc/shopsystem/config.ini + +if [[ $? != 0 ]]; then + echo "Build failed." + exit 1 +fi + +if [[ "$1" = 'tmux' ]]; then tmux +fi -- cgit v1.2.3