Created
March 4, 2019 15:46
-
-
Save libdx/d13b2b403b6aca5304aa25fd505347a2 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
( | |
NOTES_REPO=~/.notes | |
FILE_PATH=$1 | |
DIR_PATH=$(dirname $FILE_PATH) | |
cd $NOTES_REPO | |
if [ ! -d $DIR_PATH ]; then | |
mkdir -p $(dirname $DIR_PATH) | |
fi | |
vim $FILE_PATH | |
git add $FILE_PATH | |
git commit -m "Work on $FILE_PATH" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment