makepkg: avoid file|grep dependency for CRLF check
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
fa601c41ed
commit
87acfef166
1 changed files with 1 additions and 2 deletions
|
@ -2744,8 +2744,7 @@ if [[ ! -f $BUILDFILE ]]; then
|
||||||
source_safe "$BUILDFILE"
|
source_safe "$BUILDFILE"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
crlftest=$(file "$BUILDFILE" | grep -F 'CRLF' || true)
|
if [[ $(<"$BUILDFILE") = *$'\r'* ]]; then
|
||||||
if [[ -n $crlftest ]]; then
|
|
||||||
error "$(gettext "%s contains %s characters and cannot be sourced.")" "$BUILDFILE" "CRLF"
|
error "$(gettext "%s contains %s characters and cannot be sourced.")" "$BUILDFILE" "CRLF"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue