bunkdeck/proclaim

30 lines
630 B
Text
Raw Normal View History

2024-02-09 20:13:25 +00:00
#!/bin/bash -e
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
2024-02-09 20:58:15 +00:00
timezone="America/New_York"
2024-02-09 20:29:03 +00:00
declare prompt
2024-02-09 20:13:25 +00:00
makeSlug () {
# make time and date
2024-02-09 20:58:15 +00:00
time=$(TZ=${timezone} date +%I:%M%p)
date=$(TZ=${timezone} date +%m/%d)
2024-02-09 20:13:25 +00:00
# make name/time string
prompt="${username}-${date}-${time}"
}
# enter bunkchat mode (clear the screen)
clear
while true
do
figlet -f future proclaim - bunkchat
echo "You may view old chat with 'scry', heathen."
echo "-------------------------------------------"
read -r -p "speak to the server: " text
makeSlug
echo "${prompt}: $text" >> /srv/bunkchat.txt
clear
done