diff options
author | Led <led@altlinux.org> | 2014-12-14 15:13:12 +0200 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-15 11:30:24 -0400 |
commit | 14f9378d55af48e4622a9daa5d9c4632a9a2eafc (patch) | |
tree | ddefe0204a4c50c4ed26b5ccdb50e57ab47e5ef5 | |
parent | ac74851939a8bbcf7cd8d1b9d07bc6ad631f6fa6 (diff) |
Remove '-p' option of 'type' builtin command in shell scripts.
That option may be unsupported in some POSIX-complete shells.
-rwxr-xr-x | uninit.d/50vcs-uninit | 4 | ||||
-rwxr-xr-x | update-ignore.d/01update-ignore | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/uninit.d/50vcs-uninit b/uninit.d/50vcs-uninit index b330f1b..06317c5 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 which tempfile >/dev/null 2>&1 || type -p tempfile >/dev/null 2>&1; then + if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then tempfile="tempfile" - elif which mktemp >/dev/null 2>&1 || type -p mktemp >/dev/null 2>&1; then + elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then tempfile="mktemp" else echo "etckeeper warning: can't find tempfile or mktemp" >&2 diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore index 528ff8a..098fab8 100755 --- a/update-ignore.d/01update-ignore +++ b/update-ignore.d/01update-ignore @@ -171,9 +171,9 @@ if [ -e "$file" ]; then fi fi realfile="$file" - if which tempfile >/dev/null 2>&1 || type -p tempfile >/dev/null 2>&1; then + if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then tempfile="tempfile" - elif which mktemp >/dev/null 2>&1 || type -p mktemp >/dev/null 2>&1; then + elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then tempfile="mktemp" else echo "etckeeper warning: can't find tempfile or mktemp" >&2 |