From 71a41f72cc38e646ed2945f4c7b343a60247d968 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Jan 2007 18:50:51 +0000 Subject: add support for user-customizable compression #9870 svn path=/main/trunk/; revision=5555 --- bin/doinfo | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'bin/doinfo') diff --git a/bin/doinfo b/bin/doinfo index 82db070b8..7e1dd30ca 100755 --- a/bin/doinfo +++ b/bin/doinfo @@ -1,21 +1,15 @@ #!/bin/bash -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -if [ ${#} -lt 1 ] ; then - echo "doinfo: at least one argument needed" +if [[ -z $1 ]] ; then + vecho "${0##*/}: at least one argument needed" exit 1 fi -if [ ! -d "${D}usr/share/info" ] ; then - install -d "${D}usr/share/info" + +if [[ ! -d ${D}usr/share/info ]] ; then + install -d "${D}usr/share/info" || exit 1 fi -for x in "$@" ; do - if [ -e "${x}" ] ; then - install -m0644 "${x}" "${D}usr/share/info" - gzip -f -9 "${D}usr/share/info/${x##*/}" - else - echo "doinfo: ${x} does not exist" - fi -done +exec install -m0644 "$@" "${D}usr/share/info" -- cgit v1.2.3-1-g7c22