From 114e3ed40a7ddb3a6a5613aef6b9309dcba1df8c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 6 May 2013 11:26:48 -0400 Subject: Call type -p in a more compatable way. --- uninit.d/50vcs-uninit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uninit.d') diff --git a/uninit.d/50vcs-uninit b/uninit.d/50vcs-uninit index 803b0b5..519a725 100755 --- a/uninit.d/50vcs-uninit +++ b/uninit.d/50vcs-uninit @@ -21,9 +21,9 @@ if ! grep -q "$managed_by_etckeeper" "$file"; then exit 0 else realfile="$file" - if [ -n "`type -p tempfile`" ]; then + if type -p tempfile >/dev/null 2>&1; then tempfile="tempfile" - elif [ -n "`type -p mktemp`" ]; then + elif type -p mktemp >/dev/null 2>&1; then tempfile="mktemp" else echo "etckeeper warning: can't find tempfile or mktemp" >&2 -- cgit v1.2.3