diff options
author | Tyler Davis <tyler@gluecode.net> | 2025-02-12 19:47:14 +0000 |
---|---|---|
committer | Tyler Davis <tyler@gluecode.net> | 2025-02-12 19:50:38 +0000 |
commit | 2acbb0cdb6e4ecf3cf38fcec208c1434737f14ae (patch) | |
tree | afdc0df3e2bd0aee01dece145525438f25f61669 /gen.sh | |
parent | 457d3721724877d4eb9c6936b5d7556007f92353 (diff) | |
download | journal-2acbb0cdb6e4ecf3cf38fcec208c1434737f14ae.tar.gz journal-2acbb0cdb6e4ecf3cf38fcec208c1434737f14ae.zip |
Move posts to subdir, update gen.sh
Diffstat (limited to 'gen.sh')
-rwxr-xr-x | gen.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -86,10 +86,12 @@ if [ ! -d "${OUTDIR}" ]; then mkdir ${OUTDIR} ; fi MDLIST=$(eval "find ${WORKDIR} -type f -name \"*.md\" ") for m in $MDLIST; do - # shortpath trims the working directory prefix and the '.git' suffix from the directory + # shortpath trims the working directory prefix shortpath=$(eval "echo $m | sed -e 's,${WORKDIR}/,,' ") - dirpath=$(eval "echo $m | sed -e 's,${WORKDIR}/,,' -e 's,/.*.md$,,' ") - filename=$(eval "echo $m | sed -e 's,${WORKDIR}/,,' -e 's,${dirpath}/,,' -e 's,\.md,,' ") + + BNAME=$(eval "basename $m") + dirpath=$(eval "echo $m | sed -e 's,${WORKDIR}/,,' -e 's,${BNAME},,' ") + filename=$(eval "echo ${BNAME} | sed -e 's,\.md,,' ") if [ $verbose -gt 0 ]; then echo "Processing: ${shortpath}" fi |