From mboxrd@z Thu Jan 1 00:00:00 1970 From: cgit at cryptocrack.de (Lukas Fleischer) Date: Tue, 21 Feb 2012 14:23:05 +0100 Subject: [PATCH v2 2/3] highlight: declare variables In-Reply-To: <1329826411-6301-2-git-send-email-mailings@hupie.com> References: <1329826411-6301-1-git-send-email-mailings@hupie.com> <1329826411-6301-2-git-send-email-mailings@hupie.com> Message-ID: <20120221132305.GB12346@blizzard> On Tue, Feb 21, 2012 at 01:13:30PM +0100, Ferry Huberts wrote: > From: Ferry Huberts > > Signed-off-by: Ferry Huberts > --- > filters/syntax-highlighting.sh | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh > index c930e07..0f97fea 100755 > --- a/filters/syntax-highlighting.sh > +++ b/filters/syntax-highlighting.sh > @@ -36,8 +36,8 @@ > # > > # store filename and extension in local vars > -BASENAME="$1" > -EXTENSION="${BASENAME##*.}" > +declare BASENAME="$1" > +declare EXTENSION="${BASENAME##*.}" "declare" isn't POSIX'ish and we shouldn't rely on bashishms unless Lars agrees and we change the shebang to "#!/bin/bash". > > # map Makefile and Makefile.* to .mk > [ "${BASENAME%%.*}" == "Makefile" ] && EXTENSION=mk > -- > 1.7.7.6