Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Jul 4, 2014
1 parent ff8e06f commit 06b4977
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions git-source-pickup.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/perl

$project = 'doslib2';
$project = `git config --get remote.origin.url | sed -e 's/\\/\$//' | sed -e 's/^.*\\///'`;
chomp $project;
die if $project eq "";

$branch = `git branch | grep '^\*' | sed -e 's/^\* //'`; chomp $branch;
$branchfname = "-branch-$branch" if $branch ne "";
print "Current branch: $branch\n";

print "Ensuring the build tree is clean...\n";
$x = system("./git-update-all-wo-push");
Expand Down Expand Up @@ -53,12 +59,12 @@

#my $filename = $project."-rev-".sprintf("%08u",$lcrev)."-src.tar.bz2";
my $pwd = `pwd`; chomp $pwd;
my $filename = "../".($as ne "" ? $as : $project)."-$lcdate-commit-$lcommit-src.tar";
my $filename = "../".($as ne "" ? $as : $project)."-$lcdate-commit-$lcommit-src$branchfname.tar";
if (!( -f "$filename.xz" )) {
print "Packing source (all build files except LIB,OBJ,etc.)\n";
print " to: $filename\n";

$x = system("tar --exclude=.git -C .. -cvf $filename $project");
$x = system("tar -C .. -cvf $filename $project"); # --exclude=.git
die unless $x == 0;
print "Packing to XZ\n";
$x = system("xz -6e $filename");
Expand Down

0 comments on commit 06b4977

Please sign in to comment.