summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorholger <holgercremer@gmail.com>2018-09-15 19:48:17 +0200
committerGitHub <noreply@github.com>2018-09-15 19:48:17 +0200
commit3894ec1c08e814f66a9ac3d10f18bcc80b2dbf00 (patch)
tree16d8b0f5a110666c79eeff77ecfb78fee8c8165c
parent8faa66d94a0aef3246a1cf3dc5ccd46fc125ae7b (diff)
parent0dcf1618625168cc92e67c0ea385a589cd989e10 (diff)
downloadserial-barcode-scanner-3894ec1c08e814f66a9ac3d10f18bcc80b2dbf00.tar.bz2
Merge pull request #44 from smilix/master
makes tmux call at the end optional
-rw-r--r--docker/README.md2
-rwxr-xr-xdocker/init.sh11
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