Skip to content

Commit

Permalink
Changed use of mktemp to make it compatible with OSX (thanks to @phrojoe
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Manuel J. Garrido committed Jan 1, 2017
1 parent 5dbfb43 commit 2d82fcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions todo.actions.d/note
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ case "$TODO_NOTE_ACTION" in
[ -d "$TODO_NOTES_DIR" ] || mkdir -p "$TODO_NOTES_DIR" 2> /dev/null || die "Error: $TODO_NOTES_DIR is not a directory"

# Create file
filename=$(mktemp "$TODO_NOTES_DIR/${TODO_NOTE_TEMPLATE}${TODO_NOTE_EXT}")
notename=$(basename "$filename")
filename=$(mktemp "$TODO_NOTES_DIR/${TODO_NOTE_TEMPLATE}")
notename=$(basename "$filename${TODO_NOTE_EXT}")
title=$(echo "$todo" | sed -e "s/^\(x ....-..-.. \)\?//" -e "s/^(.) \?//")
echo \# $title > "$TODO_NOTES_DIR/${notename}"

Expand Down

0 comments on commit 2d82fcc

Please sign in to comment.