aboutsummaryrefslogtreecommitdiff
path: root/bin/td
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-04-05 20:06:39 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-04-05 20:46:47 +1200
commitc8ab406749124d2e762ad5cf53963070113afd0f (patch)
tree54c9721a06957ebe7098a211eea803b0230c0f5d /bin/td
parentHandle POSIX correctness in ~/.bash_profile (diff)
downloaddotfiles-c8ab406749124d2e762ad5cf53963070113afd0f.tar.gz
dotfiles-c8ab406749124d2e762ad5cf53963070113afd0f.zip
Apply runtime shebanging to POSIX shell
Diffstat (limited to 'bin/td')
-rwxr-xr-xbin/td32
1 files changed, 0 insertions, 32 deletions
diff --git a/bin/td b/bin/td
deleted file mode 100755
index 69077a8d..00000000
--- a/bin/td
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# Manage to-do files with just $EDITOR and git(1)
-
-# Specify the path and file
-dir=${TODO_DIR:-"$HOME"/Todo}
-file=${1:-"${TODO_NAME:-todo}"}
-
-# If the directory doesn't exist, create it
-[ -d "$dir" ] || mkdir -p -- "$dir" || exit
-
-# Change into the directory
-cd -- "$dir" || exit
-
-# If the current directory isn't a Git repository, try to create one
-if ! command -v isgr >/dev/null 2>&1 ; then
- printf >&2 'isgr: command not found\n'
- exit 1
-fi
-isgr || git init || exit
-
-# If the to-do file doesn't exist yet, create it
-[ -e "$file" ] || touch -- "$file" || exit
-
-# Launch an appropriate editor to edit that file
-"${VISUAL:-"${EDITOR:-ed}"}" "$file"
-
-# Add the file to the changeset
-git add -- "$file"
-
-# If there are changes to commit, commit them
-git diff-index --quiet HEAD ||
-git commit --message 'Changed by td(1df)' --quiet