forked from Dataforge/gab
Added UUCP stuff
This commit is contained in:
parent
7f52b15d63
commit
1ffd7292e6
11
gab
11
gab
|
@ -8,9 +8,10 @@
|
|||
|
||||
help_text=$'GAB - A simple chat interface\n\nsyntax: gab [flag] [value]\n\nflag value\n---------- ---------------\n-h, --help none\n-m, --msg Quoted text with the msg being added to chat\n-l, --log An integer representing the number of rows you\'d like to view, default 5'
|
||||
|
||||
file_path=./test.txt
|
||||
file_path=/var/spool/uucppublic/chat.txt
|
||||
title="GAB v1.0"
|
||||
last_date="Last message: $(date -r $file_path)"
|
||||
HOST=`grep "nodename" /etc/uucp/config | tail -n1 | cut -f 2`
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
|
@ -27,9 +28,15 @@ else
|
|||
echo "Must pass a quoted string w/ the msg flag"
|
||||
exit 1
|
||||
else
|
||||
echo "$USER > $2" >> $file_path
|
||||
echo "$USER@$HOST > $2" >> $file_path
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
for i in $(uuname);
|
||||
do
|
||||
set +H
|
||||
uucp $file_path $i!~/chat.txt
|
||||
done
|
||||
|
||||
echo "Successfully added text to chatlog"
|
||||
exit 0
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue