From owner-freebsd-ports Wed Nov 28 10:10:10 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 14B3F37B41B for ; Wed, 28 Nov 2001 10:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fASIA1483793; Wed, 28 Nov 2001 10:10:01 -0800 (PST) (envelope-from gnats) Received: from h132-197-97-45.gte.com (h132-197-179-27.gte.com [132.197.179.27]) by hub.freebsd.org (Postfix) with ESMTP id 6341437B41A; Wed, 28 Nov 2001 10:01:17 -0800 (PST) Received: (from ak03@localhost) by h132-197-97-45.gte.com (8.11.6/8.11.4) id fASI1Gc67150; Wed, 28 Nov 2001 13:01:16 -0500 (EST) (envelope-from ak03) Message-Id: <200111281801.fASI1Gc67150@h132-197-97-45.gte.com> Date: Wed, 28 Nov 2001 13:01:16 -0500 (EST) From: "Alexander N. Kabaev" Reply-To: "Alexander N. Kabaev" To: FreeBSD-gnats-submit@freebsd.org Cc: kde@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/32358: bashisms in kdelibs/kdeprint/filters/imagetops script Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 32358 >Category: ports >Synopsis: bashisms in kdelibs/kdeprint/filters/imagetops script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 28 10:10:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Alexander N. Kabaev >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD kanpc.gte.com 5.0-CURRENT FreeBSD 5.0-CURRENT #7: Mon Nov 26 13:00:28 EST 2001 root@kanpc.gte.com:/usr/src/sys/i386/compile/KANPC i386 >Description: There is a imagetops script installed kdelibs2/kdeprint which uses bash specific constructs, even though it claims to be a sh script. Our /bin/sh obviously fails executing it. Attached patch makes it work correctly with our shell. Warning - it introduces a new patch file in the port 'files' directory. >How-To-Repeat: imagetops >Fix: Index: files/patch-kdeprint::imagetops =================================================================== RCS file: files/patch-kdeprint::imagetops diff -N files/patch-kdeprint::imagetops --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-kdeprint::imagetops 28 Nov 2001 17:36:09 -0000 @@ -0,0 +1,25 @@ +--- kdeprint/filters/imagetops.orig Wed Nov 28 12:25:21 2001 ++++ kdeprint/filters/imagetops Wed Nov 28 12:29:50 2001 +@@ -27,11 +27,17 @@ + # check the file mime type, and set the command correspondingly + cmd= + magic=`file -bi $FILE` +-if [[ $magic != image/* ]] ; then +- echo "Not an image" +- exit 1; +-fi +-case ${magic/image\//} in ++ ++case $magic in ++ image/*) ++ ;; ++ *) ++ echo "Not an image" ++ exit 1; ++ ;; ++esac ++ ++case ${magic##image\/} in + jpeg) + cmd="djpeg -pnm" + ;; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message