aboutsummaryrefslogtreecommitdiffhomepage
path: root/threadcat-read.sh
blob: 424dc5521b02f4c7c986ed089deaa6ca1f805698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

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 [BOARD] THREAD"
fi