Skip to content

Commit 75ab5df

Browse files
committed
Make draft creation script slightly better with some output
1 parent 09de78e commit 75ab5df

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/new_draft.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -e
4+
35
# Creates a new draft with populated header
46

57
if [ -z $1 ] || [ -z $2 ]
@@ -13,7 +15,7 @@ FIRST_TAG=$2
1315

1416
mkdir -p org/_drafts
1517
touch org/_drafts/$DRAFT
16-
cat <<FILE_CONTENTS >> org/_drafts/$DRAFT
18+
cat <<FILE_CONTENTS > org/_drafts/$DRAFT
1719
#+OPTIONS: toc:nil num:nil
1820
#+STARTUP: showall indent
1921
#+STARTUP: hidestars
@@ -30,3 +32,5 @@ preview_image: ...
3032
3133
Once upon a time there was...
3234
FILE_CONTENTS
35+
36+
echo "Created new draft in org/_drafts/$DRAFT"

0 commit comments

Comments
 (0)