about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authormr.Shu <mr@shu.io>2014-02-25 16:47:45 +0100
committermr.Shu <mr@shu.io>2014-02-25 16:47:45 +0100
commit611d5445312df9366f747879450f5c43d8a5fb0d (patch)
tree6540e331f05e3fc7254066218426e9c64453cef0
parentea681c7f522e5512fecaec5a094efb1b8ba969e5 (diff)
downloadprofani-tty-611d5445312df9366f747879450f5c43d8a5fb0d.tar.gz
added error tracing
-rwxr-xr-xinstall-all.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/install-all.sh b/install-all.sh
index 636bd6e7..ed9293e6 100755
--- a/install-all.sh
+++ b/install-all.sh
@@ -1,7 +1,19 @@
-#!/bin/sh
+#!/bin/bash
+
+set -o errtrace
 
 STATUS=development
 
+error_handler()
+{
+        ERR_CODE=$?
+        echo "Error $ERR_CODE with command '$BASH_COMMAND' on line ${BASH_LINENO[0]}. Exiting."
+        exit $ERR_CODE
+
+}
+
+trap error_handler ERR
+
 debian_prepare()
 {
     echo