diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-10 11:54:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-10 11:54:09 -0400 |
commit | b6e9e1f4bd3161d6d4879784c2de2c103aa8f3ae (patch) | |
tree | dff0a2c585f0002842f39e172833dcd6916421a1 | |
parent | b43e341f4dd64ee319f24d4bfb1c76b85b1c2fcf (diff) |
guard unsets
Apparently fails with netbsd's shell. Unsure if that shell is POSIX.
-rwxr-xr-x | etckeeper | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -16,8 +16,12 @@ if [ -e $conf ]; then . $conf fi -unset GIT_WORK_TREE -unset GIT_DIR +if [ -n "$GIT_WORK_TREE" ]; then + unset GIT_WORK_TREE +fi +if [ -n "$GIT_DIR" ]; then + unset GIT_DIR +fi program_directory="${0%/*}" if [ -n "$program_directory" ]; then |