blob: 56851849132249a9cdbc7dbe204384109ecdd8d6 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/bash
export NEWS_FILE="$(date +%Y%m%d_%H%M%S)"
vi $NEWS_FILE
echo "Renaming..."
TITLE="$(head -n 1 $NEWS_FILE)"
TO_FILE=$NEWS_FILE-$(echo $TITLE | tr '[:upper:]' '[:lower:]' | sed -e 's/ /\_/g' )
mv $NEWS_FILE news/$TO_FILE
echo "Adding to git repo..."
git add news/$TO_FILE
git commit -m "Added $TO_FILE with $(head -n 1 news/$TO_FILE)"
|