forked from wolfSSL/wolfssl
Update openwrt script
This commit is contained in:
@ -1,11 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
runCMD() { # usage: runCMD "<command>" "<retVal>"
|
runCMD() { # usage: runCMD "<command>" "<retVal>"
|
||||||
eval $1 >/dev/null 2>&1
|
TMP_FILE=$(mktemp)
|
||||||
|
eval $1 > $TMP_FILE 2>&1
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ "$RETVAL" != "$2" ]; then
|
if [ "$RETVAL" != "$2" ]; then
|
||||||
echo "Command ($1) returned ${RETVAL}, but expected $2. Rerunning with output to terminal:"
|
echo "Command ($1) returned ${RETVAL}, but expected $2. Error output:"
|
||||||
eval $1
|
cat $TMP_FILE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user