eureka/tw.sh

16 lines
360 B
Bash
Raw Permalink Normal View History

#!/bin/sh
siteroot=$(grep "#define SITEROOT" config.h | awk '{print $3}' | sed -e 's/"//g')
twtxt=$(grep "#define TWTXT" config.h | awk '{print $3}' | sed -e 's/"//g')
twt(){
self=$(mktemp)
new=$(mktemp)
2024-09-27 01:32:04 +00:00
echo "$(/sbin/date -Is)\t$@" > ${self}
cat ${self} ${siteroot}${twtxt} > ${new}
cp ${new} ${siteroot}${twtxt}
rm ${new}
rm ${self}
}
twt $@