pidgin: d064c099: Make error output during autogen actuall...

grim at pidgin.im grim at pidgin.im
Sun May 4 22:20:44 EDT 2008


-----------------------------------------------------------------
Revision: d064c09988301df44e3a5dd007d88a97374904d1
Ancestor: 66d0d0a2b055456da3c96fe56ee490a85d18aa22
Author: grim at pidgin.im
Date: 2008-05-05T02:00:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d064c09988301df44e3a5dd007d88a97374904d1

Modified files:
        autogen.sh

ChangeLog: 

Make error output during autogen actually readable...


-------------- next part --------------
============================================================
--- autogen.sh	a3197b4a5bbd510e090486cf9ac8ee45c559a1ec
+++ autogen.sh	7f517e7287cdcefe0479f851a9b857a54a4065fe
@@ -79,17 +79,23 @@ run_or_die () { # beotch
 	CMD=$1
 	shift
 
+	OUTPUT=`mktemp autogen-XXXX`
+
 	printf "%s" "running ${CMD} ${@}... "
-	OUTPUT=`${CMD} ${@} 2>&1`
+	${CMD} ${@} >${OUTPUT} 2>&1
+
 	if [ $? != 0 ] ; then
 		echo "failed."
-		echo ${OUTPUT}
+		cat ${OUTPUT}
+		rm -f ${OUTPUT}
 		exit 1
 	else
 		echo "done."
-		if [ x"${OUTPUT}" != x"" ] ; then
-			echo ${OUTPUT}
+		if [ `stat --printf="%s" ${OUTPUT}` -ge 0 ] ; then
+			cat ${OUTPUT}
 		fi
+
+		rm -f ${OUTPUT}
 	fi
 }
 


More information about the Commits mailing list