[build] Only reference the last 10 interim builds in the composite

This change will allow to physically remove old interim builds which
are not useful anymore and take up disk space [1].

[1] https://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/msg01154.html

Change-Id: If75dcf41cab984ba008e77b53dea50ac68feabc5
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
diff --git a/org.eclipse.gmf.runtime.repository/gmf-runtime-hipp-publish.sh b/org.eclipse.gmf.runtime.repository/gmf-runtime-hipp-publish.sh
index a6c66ca..e6b42a5 100644
--- a/org.eclipse.gmf.runtime.repository/gmf-runtime-hipp-publish.sh
+++ b/org.eclipse.gmf.runtime.repository/gmf-runtime-hipp-publish.sh
@@ -424,7 +424,7 @@
 # Backup then clean remote update site
 if [ -d "$remoteUpdateSite" ]; then
 	echo "`date +%Y-%m-%d-%H:%M:%S` Add existing update sites to the composite update site repository file."
-	for existingDropDir in `find ${remoteUpdateSite}/ -mindepth 1 -maxdepth 1 -type d` ; do
+	for existingDropDir in `find ${remoteUpdateSite}/ -mindepth 1 -maxdepth 1 -type d | sort | tail -n 10` ; do
 		addExistingDropDir=$(basename $existingDropDir)
 		echo "`date +%Y-%m-%d-%H:%M:%S` Add ${addExistingDropDir}."
 		addRepositoryLocation="<repository location=\"${addExistingDropDir}\"/>"