]> apps.delaporte.us Git - minion.git/commitdiff
Ensure year directory exists when adding a file
authorEdward Delaporte <edward@delaporte.us>
Tue, 2 Jun 2026 23:24:21 +0000 (18:24 -0500)
committerEdward Delaporte <edward@delaporte.us>
Tue, 2 Jun 2026 23:24:21 +0000 (18:24 -0500)
bin/mn

diff --git a/bin/mn b/bin/mn
index 48f98afcf5cf586b1fa0685c327966a5d3b2f5bc..92f3eb8b6e91b7481d6745f0920d2c6b82677747 100755 (executable)
--- a/bin/mn
+++ b/bin/mn
@@ -2,4 +2,5 @@
 set year (date +%Y)
 set input $(string join '-' $argv)
 set topic $(string replace -a ' ' '-' $input)
+mkdir -p "$HOME/Journal/$year"
 vim $(printf "$HOME/Journal/$year/%02d-$topic.md" (date +%m))