[m-rev.] for review: remove old RPMs from the BETA_WEBDIR directory.
Peter Ross
pro at missioncriticalit.com
Mon Jun 28 22:10:57 AEST 2004
Hi,
For fjh to review.
Note that we still don't clean up the ftp directory, but seeing that
we use scp to copy the files there, I'm not sure what the best approach
for deleting those files is.
===================================================================
tools/build_rpm:
Delete any old rpms in from the BETA_WEBDIR if we manage to
install a new rpm.
Index: tools/build_rpm
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/build_rpm,v
retrieving revision 1.3
diff -u -r1.3 build_rpm
--- tools/build_rpm 16 Feb 2004 21:13:43 -0000 1.3
+++ tools/build_rpm 28 Jun 2004 12:08:34 -0000
@@ -104,10 +104,12 @@
stable)
base_version=`cat $BETA_WEBDIR/latest-stable-version`
version=$base_version
+ regex="[0-9]"
;;
unstable)
base_version=`cat $BETA_WEBDIR/latest-unstable-version`
version=$base_version-unstable
+ regex="unstable"
;;
esac
@@ -143,9 +145,19 @@
$BETA_WEBDIR/mercury-compiler-$version_with_underscores-$rel.$arch.rpm" \
|| failed 'copying RPM to web site'
su mercury -c "\
+rm -f `find $BETA_WEBDIR -name \*$regex-$rel.$arch.rpm -and -not -name \
+ mercury-compiler-$version_with_underscores-$rel.$arch.rpm`" \
+ || failed 'to delete old RPM'
+
+su mercury -c "\
cp $RPMDIR/SRPMS/mercury-compiler-$base_vsn_with_us-$rel.src.rpm \
$BETA_WEBDIR/mercury-compiler-$version_with_underscores-$rel.src.rpm" \
|| failed "copying SRPM to web site"
+su mercury -c "\
+rm -f `find $BETA_WEBDIR -name \*$regex-$rel.src.rpm -and -not -name \
+ mercury-compiler-$version_with_underscores-$rel.src.rpm`" \
+ || failed 'to delete old source RPM'
+
su mercury -c "\
cd $BETA_WEBDIR; \
PATH=/home/mercury/public/cron/scripts:$PATH; \
--
Software Engineer (Work) +32 2 757 10 15
Mission Critical (Mobile) +32 485 482 559
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list