Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=8d20cd4461c92855686bc3ca8822e92fdee31d87

commit 8d20cd4461c92855686bc3ca8822e92fdee31d87
Author: crazy <[email protected]>
Date:   Mon Jun 20 13:35:05 2016 +0200

makepkg - workaround some grep issues

diff --git a/scripts/makepkg b/scripts/makepkg
index 030e668..f3c1ba3 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -1114,7 +1114,7 @@ if [ "$CHROOT" = "1" -a "$INCHROOT" != "1" ]; then
# copy these before any update since without them we can't even reach the 
servers
cp -pf /etc/{resolv.conf,services} $CHROOTDIR/etc
# run pacman-g2 -Su twice in case pacman-g2 updated
-               yes "" | /usr/sbin/chroot "$CHROOTDIR" $PACMAN -Sy pacman-g2 
--ask 94 && \
+               yes "" 2>/dev/null | /usr/sbin/chroot "$CHROOTDIR" $PACMAN -Sy 
pacman-g2 --ask 94 && \
/usr/sbin/chroot "$CHROOTDIR" $PACMAN -Su --noconfirm
if [ "$?" != "0" ]; then
error "Failed to update chroot environment."
@@ -1213,7 +1213,7 @@ if [ "$CHROOT" = "1" -a "$INCHROOT" != "1" ]; then
chroot_clean
# check optimization and write it to $BUILDSCRIPT
msg "Checking for optimization..."
-               if cat "${BUILDLOG}" | grep -v HOST_ | grep -q -- 
"\($CFLAGS\|$CXXFLAGS\)" ; then
+               if grep -v "HOST_"  "${BUILDLOG}"  2>/dev/null | grep -E  -q  
"(${CFLAGS}|${CXXFLAGS})" ; then
if ! grep -q "# optimization" "${BUILDSCRIPT}" ; then
$ECHO -e "\n# optimization OK" >> "${BUILDSCRIPT}"
fi
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to