From 87acfef1669a3d6a185fde8c83535cb57bd3bbc5 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 24 Mar 2013 15:09:18 -0400 Subject: makepkg: avoid file|grep dependency for CRLF check Signed-off-by: Dave Reisner Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 7ba53b07..1bc93519 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2744,8 +2744,7 @@ if [[ ! -f $BUILDFILE ]]; then source_safe "$BUILDFILE" fi else - crlftest=$(file "$BUILDFILE" | grep -F 'CRLF' || true) - if [[ -n $crlftest ]]; then + if [[ $(<"$BUILDFILE") = *$'\r'* ]]; then error "$(gettext "%s contains %s characters and cannot be sourced.")" "$BUILDFILE" "CRLF" exit 1 fi -- cgit v1.2.3-24-g4f1b