From eb6d7f4c56f37488089caa75b3c4033bde5cd741 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Sat, 20 Jan 2007 04:10:04 +0000 Subject: [PATCH] if there is only whitespace, then post-filter will fail and cause the script to halt --- mkfedora | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mkfedora b/mkfedora index fff9a40d..8821621a 100755 --- a/mkfedora +++ b/mkfedora @@ -75,12 +75,6 @@ usage() exit 1 } -### post-process output of createrepo --quiet or of yum-arch -# replaces ^M with ^J, and removes whitespace-only lines -function post-filter () { - tr '\r' '\n' | grep -v '^ *$' -} - # Get options while getopts "l:r:a:g:p:x:kvh" opt ; do case $opt in @@ -299,14 +293,14 @@ if [ -n "$RPM_BUILD_DIR" ] ; then RPM_RPMS_DIR=$(cd $(dirname $RPM_BUILD_DIR)/RPMS && pwd -P) # yum-2.0.x if [ -x /usr/bin/yum-arch ] ; then - yum-arch $RPM_RPMS_DIR | post-filter + yum-arch -q $RPM_RPMS_DIR fi # yum-2.4.x if [ -x /usr/bin/createrepo ] ; then if [ -f $RPM_RPMS_DIR/yumgroups.xml ] ; then groupfile="-g yumgroups.xml" fi - createrepo --quiet $groupfile $RPM_RPMS_DIR | post-filter + createrepo --quiet $groupfile $RPM_RPMS_DIR fi # If run under sudo, allow user to delete the headers/ and # repodata/ directories. -- 2.47.0