#!/bin/sh
TORRENT=/opt/transmission/NOOBS_lite_v2_4.zip.torrent
CLIENT=/opt/transmission/bin/transmission-cli
DIR=`mktemp -d`
CURRENT="$PWD"
rm -rf ~/.config/transmission
cd "$DIR"
"$CLIENT" --download-dir . "$TORRENT" >/dev/null 2>/dev/null
cat transmission-instrumentation.log.json
cd "$CURRENT"
rm -rf "$DIR"

#!/bin/sh
TORRENT=/opt/transmission/NOOBS_lite_v2_4.zip.torrent
CLIENT=/opt/transmission/bin/transmission-cli
DIR=`mktemp -d`
CURRENT="$PWD"
rm -rf ~/.config/transmission
cd "$DIR"
"$CLIENT" --download-dir . "$TORRENT" >/dev/null 2>/dev/null
RET=$?
cat transmission-instrumentation.log.json
cd "$CURRENT"
rm -rf "$DIR"
exit $RET

Use Transmission's exit code as the P2P BT test script's
Use Transmission's exit code as the P2P BT test script's

Otherwise, if the program failed, the script would hide its exit code.
