Skip to content
Browse files

Get sources/ from Git instead of old CVS

To change sources in your trees, just do rm -r sources/*.

The missing directories will be re-fetched, this time from Git.
  • Loading branch information...
1 parent cf772df commit 92582da016075cf118c6666e14e082b99ffd1ac0 @docelic docelic committed Oct 7, 2009
Showing with 25 additions and 17 deletions.
  1. +10 −6 Makefile
  2. +15 −11 bin/coup
View
16 Makefile
@@ -92,22 +92,26 @@ OUTPUT/files: $(shell find files) bin/dbgen
rm -rf $@/
cp -a files $O/
rm -rf `find $@ -name CVS`
+ rm -rf `find $@ -name .git`
cp bin/dbgen $O/files/
cd files; for p in *; do \
if test "$$p" != "CVS"; then \
- if test -d "$$p"; then \
- cp -a $$p ../$O/files/; \
- tar --exclude=CVS -cf ../$O/files/$$p.tar $$p; \
- tar --exclude=CVS -zcf ../$O/files/$$p.tar.gz $$p; \
- tar --exclude=CVS -jcf ../$O/files/$$p.tar.bz2 $$p \
- ; fi \
+ if test "$$p" != ".git"; then \
+ if test -d "$$p"; then \
+ cp -a $$p ../$O/files/; \
+ tar --exclude=CVS --exclude=.git -cf ../$O/files/$$p.tar $$p; \
+ tar --exclude=CVS --exclude=.git -zcf ../$O/files/$$p.tar.gz $$p; \
+ tar --exclude=CVS --exclude=.git -jcf ../$O/files/$$p.tar.bz2 $$p \
+ ; fi \
+ ; fi \
; fi \
; done
OUTPUT/images: $(shell find images)
echo "C $@/"
rm -rf $@/
cp -a images $O/
rm -rf `find $@ -name CVS`
+ rm -rf `find $@ -name .git`
OUTPUT/xmldocs.css: docbook/xmldocs.css
echo "C $@"
cp $< $@
View
26 bin/coup
@@ -2,8 +2,8 @@
# Manages your sources/ subdirectory inside xmldocs.
# Automatically check-outs or updates source trees.
-# Run as: bin/coup REV, like bin/coup 5.2.0 or bin/coup cvs-head
-# bin/coup -u REV will run cvs update
+# Run as: bin/coup REV, like bin/coup 5.2.0 or bin/coup git-head
+# bin/coup -u REV will run git update
use warnings;
use strict;
@@ -21,27 +21,31 @@ my $rev = shift;
$rev or die "Usage: $0 <IC version>\n";
my $rev_no_minor;
-my $cvs_r = "";
+my $git_r = "";
-if ( $rev =~ /^\d/ ) { # Everything except 'cvs-head'
+if ( $rev =~ /^\d/ ) { # Everything except 'git-head'
( $rev_no_minor = reverse $rev ) =~ s/.+?\.//;
$rev_no_minor = reverse $rev_no_minor;
- ( $cvs_r = $rev_no_minor ) =~ s/\./_/g;
- $cvs_r = "-r STABLE_$cvs_r-branch";
+ ( $git_r = $rev_no_minor ) =~ s/\./_/g;
+ $git_r = "STABLE_$git_r-branch";
}
if ( -d ($_ = "sources/$rev") ) { # Source is here, only update
if ( $update ) {
chdir $_;
print STDERR "CUP $rev\n";
- DEBUG and print "DBG $ENV{PWD}: cvs -z9 update -d >& ../../tmp/cup.$rev\n";
- system("cvs -z9 update -d >& ../../tmp/cup.$rev");
+ DEBUG and print "DBG $ENV{PWD}: git pull >& ../../tmp/cup.$rev\n";
+ system("git pull >& ../../tmp/cup.$rev");
}
}
else { # Need to perform checkout
- chdir "sources";
+ chdir "sources" or die "Can't chdir sources ($!)";
print STDERR "CO $rev\n";
- DEBUG and print "DBG $ENV{PWD}: cvs -z9 -d:pserver:cvs\@cvs.icdevgroup.org:/var/cvs checkout -d $rev $cvs_r interchange > ../tmp/co.$rev 2>&1";
- system("cvs -z9 -d:pserver:cvs\@cvs.icdevgroup.org:/var/cvs checkout -d $rev $cvs_r interchange > ../tmp/co.$rev 2>&1");
+ DEBUG and print "DBG $ENV{PWD}: git clone git://git.icdevgroup.org/interchange $rev > ../tmp/co.$rev 2>&1";
+ system("git clone git://git.icdevgroup.org/interchange $rev > ../tmp/co.$rev 2>&1");
+
+ chdir "$rev" or die "Can't chdir $rev ($!)";
+ DEBUG and print "DBG $ENV{PWD}: git checkout --track -b '$git_r' > ../../tmp/co.$rev 2>&1";
+ system("git checkout --track -b '$git_r'");
}

0 comments on commit 92582da

Please sign in to comment.
Something went wrong with that request. Please try again.