commit ed73a206d35f2232cfa37111fe6e55ac5ae5295a
parent 80b01b6885edffff9291ba5bf981ec986488c00b
Author: Hugo Soucy <hugo@soucy.cc>
Date: Sat, 17 Dec 2016 10:06:12 -0500
Make dir if dosen't exist.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fakestache b/fakestache
@@ -43,7 +43,9 @@ case $1 in
archetype_title_nospecials=${archetype_title//[\'!,:;?]/}
archetype_filename=${archetype_title_nospecials// /-}.md
- mo $ARCHETYPES_PATH/$1.md > $CONTENT_PATH/$1/"${NOW_DATE:0:4}"/"${NOW_DATE:5:2}"/"${archetype_filename,,}"
+ mkdir -p "$CONTENT_PATH/$1/${NOW_DATE:0:4}/${NOW_DATE:5:2}/"
+
+ mo $ARCHETYPES_PATH/$1.md > "$CONTENT_PATH/$1/${NOW_DATE:0:4}/${NOW_DATE:5:2}/${archetype_filename,,}"
echo "- The file '$CONTENT_PATH/$1/${NOW_DATE:0:4}/${NOW_DATE:5:2}/${archetype_filename,,}' hab been created."