Skip to content

Commit

Permalink
fix new.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
icco committed Mar 21, 2024
1 parent 186f670 commit f4146bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions new.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /bin/zsh

id=$(ls ./posts | sort -n | sed 's/.mdx$//g' | tail -n 1 | awk '{print $1+1}')
id=$(ls ./posts | sort -n | sed 's/.md$//g' | tail -n 1 | awk '{print $1+1}')

cat <<EOS > ./posts/$id.mdx
cat <<EOS > ./posts/$id.md
---
id: $id
Expand All @@ -16,6 +16,6 @@ permalink: "/post/$id"
TBD.
EOS

git add ./posts/$id.mdx
git add ./posts/$id.md
git ci -m "chore: init post $id"
open -a "IA Writer" ./posts/$id.mdx
open -a "IA Writer" ./posts/$id.md

0 comments on commit f4146bc

Please sign in to comment.