bamboo-2010.2.25: scripts/mkentry.sh
#!/bin/bash
# Григорий Холомьёв showed us how to add post from a shell
echo -n "Blog entry title: "
read title
echo "Recording \"$title\""
entry="$(date +%y-%m-%d) $title"
cat >> "blog/$entry"
echo -e "\nWell done!\n"
echo "Now you can choose tags for you entry $entry one per line."
echo "There are some tags within your db:"
ls tag
while read tag
do
if [[ $tag == "" ]]; then
break;
fi
echo $entry >> "tag/$tag"
git add "tag/$tag"
done
git add "blog/$entry"