Index: maintainer/update_unpacked
===================================================================
--- maintainer/update_unpacked (revision 283)
+++ maintainer/update_unpacked (working copy)
@@ -5,19 +5,26 @@
#
SVN_PATH="/work/master/unpacked"
-SVN_PACKAGES="c-grammar contract-c cxx-grammar esdf boxedsdf sdf-astgen
sdf-attribute sdf-detgen sdf-option str-lazy cxx-basic specs-grammar transformers olena
vaucanson tc-maintainer clsp havm nolimips monoburg ranch ddd"
+# List of packages with the corresponding URL. If the line ends with
+# an `R', the package needs a svn-revision file containing the lastest
+# svn revision (historical dep from nix.)
+SVN_PACKAGES="/work/master/maintainer/packages"
-# these packages need a svn-revision file containing the lastest svn revision.
-# historical dep from nix.
-SVN_REVISIONS="c-grammar contract-c cxx-grammar esdf boxedsdf sdf-astgen
sdf-attribute sdf-detgen sdf-option str-lazy cxx-basic specs-grammar transformers"
+(
+ cd "$SVN_PATH"
+ while read package url svn_rev_p; do
+ echo $package
-for i in $SVN_PACKAGES; do
- echo $i
- ( cd "$SVN_PATH/$i" && svn cleanup && svn -q update )
-done
+ # Extract a fresh copy of the project.
+ svn checkout -q "$url" "$package.new"
+ mv "$package" "$package.old"
+ mv "$package.new" "$package"
+ rm -rf "$package.old"
-for i in $SVN_REVISIONS; do
- ( cd "$SVN_PATH/$i" &&
- svn status -v -N -q ./ | awk '{ if ($NF == ".") print $1 }' >
svn-revision
- )
-done
+ # Create a svn-revision file if needed.
+ if test "x$svn_rev_p" == xR; then
+ svn status -v -N -q "$package" | \
+ awk "{ if (\$NF == \"$package\") print \$1 }"
>"$package/svn-revision"
+ fi
+ done < $SVN_PACKAGES
+)