summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-03-24 15:09:18 -0400
committerAllan McRae <allan@archlinux.org>2013-04-06 15:37:48 +1000
commit87acfef1669a3d6a185fde8c83535cb57bd3bbc5 (patch)
tree9dcfdbb1903c0e7d682ae20ef7bfde6916d78b38 /scripts
parentfa601c41ed356a7d9e05995fa4337203cfaab6ed (diff)
downloadpacman-87acfef1669a3d6a185fde8c83535cb57bd3bbc5.tar.xz
makepkg: avoid file|grep dependency for CRLF check
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in3
1 files changed, 1 insertions, 2 deletions
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