Przeglądaj źródła

Update openwrt script

Juliusz Sosinowicz 7 miesięcy temu
rodzic
commit
5372cd5026
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      Docker/OpenWrt/runTests.sh

+ 4 - 3
Docker/OpenWrt/runTests.sh

@@ -1,11 +1,12 @@
 #!/bin/sh
 
 runCMD() { # usage: runCMD "<command>" "<retVal>"
-    eval $1 >/dev/null 2>&1
+    TMP_FILE=$(mktemp)
+    eval $1 > $TMP_FILE 2>&1
     RETVAL=$?
     if [ "$RETVAL" != "$2" ]; then
-        echo "Command ($1) returned ${RETVAL}, but expected $2. Rerunning with output to terminal:"
-        eval $1
+        echo "Command ($1) returned ${RETVAL}, but expected $2. Error output:"
+        cat $TMP_FILE
         exit 1
     fi
 }