[PC-BSD Commits] r19661 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Sat Oct 13 07:15:19 PDT 2012


Author: kris
Date: 2012-10-13 14:15:19 +0000 (Sat, 13 Oct 2012)
New Revision: 19661

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Move cleanup to its own function



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-10-13 14:12:18 UTC (rev 19660)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-10-13 14:15:19 UTC (rev 19661)
@@ -5577,6 +5577,20 @@
   	fi
 }
 
+ab_clean_build_tmpfiles()
+{
+	local build=$1
+
+	# Cleanup 
+	rm ${PBI_TMPDIR}/${build}.result 2>/dev/null
+	rm ${PBI_TMPDIR}/${build}.pid 2>/dev/null
+	rm ${PBI_TMPDIR}/${build}.bPort 2>/dev/null
+	rm ${PBI_TMPDIR}/${build}.od 2>/dev/null
+	rm ${PBI_TMPDIR}/${build}.mp 2>/dev/null
+	rm ${PBI_TMPDIR}/${build}.cd 2>/dev/null
+	rm ${PBI_TMPDIR}/${build}.zmnt 2>/dev/null
+}
+
 # Start the auto-build traversal process
 do_pbi_autob() {
 
@@ -5614,14 +5628,8 @@
 				# Run the post-build process
 				ab_post_build ${build}
 
-				# Cleanup 
-				rm ${PBI_TMPDIR}/${build}.result
-				rm ${PBI_TMPDIR}/${build}.pid
-				rm ${PBI_TMPDIR}/${build}.bPort
-				rm ${PBI_TMPDIR}/${build}.od
-				rm ${PBI_TMPDIR}/${build}.mp
-				rm ${PBI_TMPDIR}/${build}.cd
-				rm ${PBI_TMPDIR}/${build}.zmnt 2>/dev/null
+				# Cleanup
+				ab_clean_build_tmpfiles ${build}
 			fi
 		fi
 		if [ $done -eq 1 ] ; then continue ; fi



More information about the Commits mailing list