summaryrefslogtreecommitdiff
path: root/bin/sblog
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-08-13 16:54:30 -0700
committerSean Whitton <spwhitton@spwhitton.name>2016-08-13 16:54:30 -0700
commite600c46ecd95a6e5dfedd633c9e5af78726702e3 (patch)
treee1a7f8d54a833f30fc4a5cdd3e4dc060ea0729c3 /bin/sblog
parent38794be3cef2a553b7b5ebd330f1175f2189ff12 (diff)
downloaddotfiles-e600c46ecd95a6e5dfedd633c9e5af78726702e3.tar.gz
sblog now finds debuild logs too
Diffstat (limited to 'bin/sblog')
-rwxr-xr-xbin/sblog18
1 files changed, 2 insertions, 16 deletions
diff --git a/bin/sblog b/bin/sblog
index 6c5f7414..8bdb26bf 100755
--- a/bin/sblog
+++ b/bin/sblog
@@ -1,8 +1,6 @@
#!/usr/bin/perl
# try to view latest debuild/sbuild log
-# TODO don't check for symlinks, rather actually put the arch in and
-# find the build log so that this works for both debuild and sbuild
use strict;
use warnings;
@@ -11,18 +9,6 @@ use File::Glob;
chomp( my $version = `dpkg-parsechangelog -SVersion`);
chomp( my $package = `dpkg-parsechangelog -SSource` );
+chomp( my $arch = `dpkg --print-architecture` );
-my @logs = <../${package}_${version}_*.build>;
-
-my @symlinks;
-foreach my $log ( @logs ) {
- push @symlinks, $log if ( -l $log );
-}
-
-if ( scalar @symlinks > 1 ) {
- print "multiple logs you might want to look at: \n";
- print join "\n", @symlinks;
- print "\n";
-} else {
- system "less $symlinks[0]";
-}
+system "less ../${package}_${version}_$arch.build";