aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-02-15 17:05:18 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-02-15 17:05:18 +1300
commitdc226217e1dd05d2b66630175d3317db872ea092 (patch)
tree3d54645ed897654eb19023ec1e1d764e7b9abd07 /bin
parentSeparate manuals into their own install target (diff)
downloaddotfiles-dc226217e1dd05d2b66630175d3317db872ea092.tar.gz
dotfiles-dc226217e1dd05d2b66630175d3317db872ea092.zip
Safety check for td(1)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/td3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/td b/bin/td
index 1c8828d2..80542979 100755
--- a/bin/td
+++ b/bin/td
@@ -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