Skip to content

Commit

Permalink
updated debian script
Browse files Browse the repository at this point in the history
  • Loading branch information
bcarrier committed Jun 21, 2019
1 parent b181f35 commit b6b0f36
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions release/release-deb.pl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,23 @@

my $VER = $ARGV[0];
my $TAGNAME = "sleuthkit-${VER}";
my $TARFILE = "${TSKDIR}/../sleuthkit-java_${VER}.orig.tar.xz";

my $TAR1FILE = "${TSKDIR}/../sleuthkit-java_${VER}.orig.tar.xz";
my $TAR2FILE = "${TSKDIR}/../sleuthkit-java_${VER}.debian.tar.xz";
my $DEBFILE = "${TSKDIR}/../sleuthkit-java_${VER}-1_amd64.deb";
die ("ERROR: ${TARFILE} file already exists") if (-e ${TARFILE});
my $BUILDFILE = "${TSKDIR}/../sleuthkit-java_${VER}-1_amd64.build";
my $BUILDINFOFILE = "${TSKDIR}/../sleuthkit-java_${VER}-1_amd64.buildinfo";
my $CHANGESFILE = "${TSKDIR}/../sleuthkit-java_${VER}-1_amd64.changes";
my $DSCFILE = "${TSKDIR}/../sleuthkit-java_${VER}-1.dsc";
my $DDEBFILE = "${TSKDIR}/../sleuthkit-java-dbgsym_${VER}-1_amd64.ddeb";

die ("ERROR: ${TAR1FILE} file already exists") if (-e ${TAR1FILE});
die ("ERROR: ${TAR2FILE} file already exists") if (-e ${TAR2FILE});
die ("ERROR: ${DEBFILE} file already exists") if (-e ${DEBFILE});
die ("ERROR: ${BUILDFILE} file already exists") if (-e ${BUILDFILE});
die ("ERROR: ${BUILDINFOFILE} file already exists") if (-e ${BUILDINFOFILE});
die ("ERROR: ${CHANGESFILE} file already exists") if (-e ${CHANGESFILE});
die ("ERROR: ${DSCFILE} file already exists") if (-e ${DSCFILE});



Expand Down Expand Up @@ -108,7 +121,7 @@ sub build_deb {
print "Running 'dh_make'. Ignore messages about overwriting, and it's OK if it goes blank\n";
`dh_make --s -y -e \“info\@sleuthkit.org\” -p sleuthkit-java_${VER} --createorig`;

die ("ERROR: ${TARFILE} file not created") unless (-e ${TARFILE});
die ("ERROR: ${TAR1FILE} file not created") unless (-e ${TAR1FILE});

print "Running debuild\n";
`debuild -us -uc`;
Expand All @@ -119,10 +132,22 @@ sub build_deb {
}
}

sub cleanup {
print "Removing intermediate files\n";
`rm -f $TAR1FILE`;
`rm -f $TAR2FILE`;
`rm -f $BUILDFILE`;
`rm -f $BUILDINFOFILE`;
`rm -f $CHANGESFILE`;
`rm -f $DSCFILE`;
`rm -f $DDEBFILE`;
}


##############################

chdir ("$TSKDIR") or die "Error changing to TSK dir $TSKDIR";

update_code();
build_deb();
cleanup();

0 comments on commit b6b0f36

Please sign in to comment.