[PATCH v2 2/3] highlight: declare variables

Lukas Fleischer cgit at cryptocrack.de
Tue Feb 21 14:23:05 CET 2012


On Tue, Feb 21, 2012 at 01:13:30PM +0100, Ferry Huberts wrote:
> From: Ferry Huberts <ferry.huberts at pelagic.nl>
> 
> Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>
> ---
>  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




More information about the CGit mailing list