summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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