From 397901e36f9d066ae791f67e18a60860cf94c69f Mon Sep 17 00:00:00 2001 From: Eelco Visser Date: Mon, 18 Aug 2003 20:47:12 +0000 Subject: [PATCH] creating tar after obtaining exported subversion directory svn path=/nixpkgs/trunk/; revision=318 --- pkgs/fetchsvn/fetchsvn.fix | 8 ++++---- pkgs/fetchsvn/fetchsvn.sh | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/fetchsvn/fetchsvn.fix b/pkgs/fetchsvn/fetchsvn.fix index 2417a5ca480..24e07dba165 100644 --- a/pkgs/fetchsvn/fetchsvn.fix +++ b/pkgs/fetchsvn/fetchsvn.fix @@ -1,9 +1,10 @@ -Function(["name","url","rev"], +Function(["name","url","dir","rev"], Package( [ ("name", Var("name")) , ("build", Relative("fetchsvn/fetchsvn.sh")) - , ("url", Var("url")) - , ("rev", Var("rev")) + , ("url", Var("url")) + , ("dir", Var("dir")) + , ("rev", Var("rev")) , ("svn", Call(IncludeFix("subversion/subversion.fix"), [ ("localServer", True) @@ -11,7 +12,6 @@ Function(["name","url","rev"], , ("httpServer", True) , ("pythonBindings", True) ])) - ] ) ) \ No newline at end of file diff --git a/pkgs/fetchsvn/fetchsvn.sh b/pkgs/fetchsvn/fetchsvn.sh index 64b489f0e3d..07dd310edfa 100755 --- a/pkgs/fetchsvn/fetchsvn.sh +++ b/pkgs/fetchsvn/fetchsvn.sh @@ -1,5 +1,17 @@ #! /bin/sh -echo "exporting svn repository $url (at rev $rev) into $out..." +set -e -$svn/bin/svn export -r $rev $url $out || exit 1 +echo "exporting svn repository $url/$dir (at rev $rev) into $out..." + +svn export -r $rev $url/$dir $dir + +# touch bootstrapped sources because subversion doesn't sets the mtime of files +# to checkout time, not to the last mtime in the repository. +MTIME=`date +%Y%m%d%H%M.%S` +echo "** INFO -- Modification time: $MTIME" +find $dir -print | xargs touch -t $MTIME +# end of touch + +mkdir $out +tar zcf $out/$dir.tar.gz $dir