summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-07-20 22:02:48 -0400
committerMax Rees <maxcrees@me.com>2019-07-20 22:02:48 -0400
commit92d7391de578e4a11066fee1c639d4371905b93a (patch)
tree92ea427dfa75f724f17b0071cb2d85bd5c294620
parent7e891ec6d79e1fb0052ec39849ea589e52c9ef9e (diff)
downloadabuild-92d7391de578e4a11066fee1c639d4371905b93a.tar.gz
abuild-92d7391de578e4a11066fee1c639d4371905b93a.tar.bz2
abuild-92d7391de578e4a11066fee1c639d4371905b93a.tar.xz
abuild-92d7391de578e4a11066fee1c639d4371905b93a.zip
abuild: use command(1) portably
According to POSIX, the "command -v" form of command(1) accepts only a single argument (command_name). Some shells will check additional arguments, but not dash.
-rw-r--r--abuild.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/abuild.in b/abuild.in
index 12c875c..39276b8 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1465,7 +1465,7 @@ human_size() {
create_apks() {
local file= dir= name= ver= apk= datadir= size=
- local gzip=$(command -v pigz gzip | head -1)
+ local gzip=$(command -v pigz || echo gzip)
getpkgver || return 1
if ! options_has "!tracedeps"; then
for file in "$pkgbasedir"/.control.*/.PKGINFO; do
@@ -1598,7 +1598,7 @@ check() {
# predefined splitfunc doc
default_doc() {
- local gzip=$(command -v pigz gzip | head -1)
+ local gzip=$(command -v pigz || echo gzip)
depends="$depends_doc"
pkgdesc="$pkgdesc (documentation)"
install_if="docs $pkgname=$pkgver-r$pkgrel"