From adc7ecfe174020a4f69ffe590cc132e6d205cb22 Mon Sep 17 00:00:00 2001 From: Dmitry Rozhkov Date: Mon, 2 May 2016 14:47:48 +0000 Subject: [PATCH] Avoid undocumented usage of the head utility. Some implementations of head (e.g. the one in Busybox) can't handle options like "-1". Replace them with "-n1". Signed-off-by: Dmitry Rozhkov --- install.sh | 2 +- libexec/bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8bbdd16..f366815 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ set -e resolve_link() { - $(type -p greadlink readlink | head -1) "$1" + $(type -p greadlink readlink | head -n1) "$1" } abs_dirname() { diff --git a/libexec/bats b/libexec/bats index 71f392f..52ebd91 100755 --- a/libexec/bats +++ b/libexec/bats @@ -27,7 +27,7 @@ help() { } resolve_link() { - $(type -p greadlink readlink | head -1) "$1" + $(type -p greadlink readlink | head -n1) "$1" } abs_dirname() {