Created
July 1, 2019 12:44
-
-
Save 5outh/e2d4f38d64d0428ee5ccbe4010bc7f95 to your computer and use it in GitHub Desktop.
Journal setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
DATE=`date +%Y-%m-%d` | |
FILE="./entries/$DATE.md" | |
if [ ! -f $FILE ]; then | |
printf "# $DATE\n" >> $FILE | |
fi | |
nvim $FILE | |
git add entries -A | |
git commit -am "Edited $DATE Entry" | |
git push origin HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment