Skip to content

Commit 06b4977

Browse files
more
1 parent ff8e06f commit 06b4977

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

git-source-pickup.pl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/perl
22

3-
$project = 'doslib2';
3+
$project = `git config --get remote.origin.url | sed -e 's/\\/\$//' | sed -e 's/^.*\\///'`;
4+
chomp $project;
5+
die if $project eq "";
6+
7+
$branch = `git branch | grep '^\*' | sed -e 's/^\* //'`; chomp $branch;
8+
$branchfname = "-branch-$branch" if $branch ne "";
9+
print "Current branch: $branch\n";
410

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

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

61-
$x = system("tar --exclude=.git -C .. -cvf $filename $project");
67+
$x = system("tar -C .. -cvf $filename $project"); # --exclude=.git
6268
die unless $x == 0;
6369
print "Packing to XZ\n";
6470
$x = system("xz -6e $filename");

0 commit comments

Comments
 (0)