add-package fix
authorJos I. Boumans <jos@dwim.org>
Mon, 19 Jan 2009 16:10:02 +0000 (17:10 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 19 Jan 2009 16:10:02 +0000 (17:10 +0100)
David patched add-package to support git, but unfortunately introduced
a portability issue for 'cp'; the --archive option isn't supported on
OSX. So, the attached patch changes --archive to it's most equal single
character options that are portable.

Porting/add-package.pl

index ba0dbfa..ded907d 100644 (file)
@@ -34,7 +34,9 @@ if ( $NoBranch ) {
     my $RepoCopy = "$Repo-$BranchName";
     print "Copying repository to $RepoCopy ..." if $Verbose;
     
-    system( "cp --archive -f $Repo $RepoCopy" )
+    ### --archive == -dPpR, but --archive is not portable, and neither
+    ### is -d, so settling for -PpR
+    system( "cp -PpR -f $Repo $RepoCopy" )
         and die "Copying master repo to $RepoCopy failed: $?";
 
     ### Going forward, use the copy in place of the original repo