aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xthreadcat-write.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/threadcat-write.sh b/threadcat-write.sh
index aff794b..c3c48d6 100755
--- a/threadcat-write.sh
+++ b/threadcat-write.sh
@@ -1,9 +1,11 @@
#!/bin/bash
THREAD_NAME=$1
+THREAD_PATH="/opt/threadcat/$THREAD_NAME"
+
if [ ! -z "${THREAD_NAME}" ]; then
- cat - | ssh $THREADCAT_USER "umask 002 && echo `whoami` -- `date` >> /opt/threadcat/$THREAD_NAME && cat - >> /opt/threadcat/$THREAD_NAME"
+ cat - | ssh $THREADCAT_USER "umask 002 && echo >> $THREAD_PATH && echo `whoami` -- `date` >> $THREAD_PATH && cat - >> $THREAD_PATH"
echo Posted to $THREAD_NAME
else
echo You did not provide a thread name.