aboutsummaryrefslogtreecommitdiffhomepage
path: root/threadcat-read.sh
diff options
context:
space:
mode:
Diffstat (limited to 'threadcat-read.sh')
-rwxr-xr-xthreadcat-read.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/threadcat-read.sh b/threadcat-read.sh
index 517f57d..424dc55 100755
--- a/threadcat-read.sh
+++ b/threadcat-read.sh
@@ -1,11 +1,18 @@
#!/bin/bash
-THREAD_NAME=$1
+BOARD_NAME=$1
+THREAD_NAME=$2
+
+if [ -z "${THREAD_NAME}" ]; then
+ THREAD_NAME=$BOARD_NAME
+else
+ THREAD_NAME=$BOARD_NAME/$THREAD_NAME
+fi
if [ ! -z "${THREAD_NAME}" ]; then
ssh $THREADCAT_USER "cat /opt/threadcat/$THREAD_NAME"
else
echo You did not provide a thread name.
- echo USAGE: "threadcat read THREAD_NAME"
+ echo USAGE: "threadcat read [BOARD] THREAD"
fi