diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-02-15 17:05:18 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-02-15 17:05:18 +1300 |
commit | dc226217e1dd05d2b66630175d3317db872ea092 (patch) | |
tree | 3d54645ed897654eb19023ec1e1d764e7b9abd07 /bin | |
parent | Separate manuals into their own install target (diff) | |
download | dotfiles-dc226217e1dd05d2b66630175d3317db872ea092.tar.gz dotfiles-dc226217e1dd05d2b66630175d3317db872ea092.zip |
Safety check for td(1)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/td | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -16,6 +16,9 @@ path=${TODO:-$HOME/Todo/todo.markdown} file=${path##*/} dir=${path%/*} +# Check we've got the tools we need +hash git || exit + # If the directory doesn't exist, create it if [[ ! -d $dir ]] ; then mkdir -p -- "$dir" || exit |