From patchwork Wed Feb 22 15:52:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9587059 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C87676051E for ; Wed, 22 Feb 2017 15:52:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7C52865A for ; Wed, 22 Feb 2017 15:52:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFD852866E; Wed, 22 Feb 2017 15:52:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1CFD2865A for ; Wed, 22 Feb 2017 15:52:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932672AbdBVPwu (ORCPT ); Wed, 22 Feb 2017 10:52:50 -0500 Received: from mail.kernel.org ([198.145.29.136]:34938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932452AbdBVPwt (ORCPT ); Wed, 22 Feb 2017 10:52:49 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67B782020F; Wed, 22 Feb 2017 15:52:48 +0000 (UTC) Received: from CookieMonster.cookiemonster.local (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A39C420172; Wed, 22 Feb 2017 15:52:46 +0000 (UTC) From: Kieran Bingham To: laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham@ideasonboard.com Subject: [PATCH 1/1] scripts: bin2png.sh: Fix POSIX shell compliance Date: Wed, 22 Feb 2017 15:52:43 +0000 Message-Id: <1487778763-10482-1-git-send-email-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20170213141522.11545-1-laurent.pinchart@ideasonboard.com> References: <20170213141522.11545-1-laurent.pinchart@ideasonboard.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kieran Bingham The string manipulations of the form ${VAR/search/replace} are not posix compliant. Use string deletion, and append instead. Signed-off-by: Kieran Bingham --- scripts/bin2png.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bin2png.sh b/scripts/bin2png.sh index 090f31fa992d..6422ee51bc33 100755 --- a/scripts/bin2png.sh +++ b/scripts/bin2png.sh @@ -4,8 +4,8 @@ FILE=${1:-.} convert_image() { local file=$1 - local pnm=${file/%bin/pnm} - local png=${file/%bin/png} + local pnm=${file%bin}pnm + local png=${file%bin}png local format=$(echo $file | sed -e 's|.*-\([[:alnum:]]*\)-\([0-9]*x[0-9]*\).*.bin|\1|' | tr '[:lower:]' '[:upper:]') local size=$(echo $file | sed -e 's|.*-\([[:alnum:]]*\)-\([0-9]*x[0-9]*\).*.bin|\2|')