From aa00266a8af002e17dce7a51711c1f6e05206831 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 21 Oct 2022 14:20:48 +0200 Subject: [PATCH] add targetname command Signed-off-by: Thomas Lamprecht --- dab | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dab b/dab index b554ae0..0df6306 100755 --- a/dab +++ b/dab @@ -16,6 +16,7 @@ my $commands = { 'veid' => '', 'basedir' => '', 'packagefile' => '', + 'targetname' => '', 'list' => '[--verbose]', 'task' => ' [--version] [--password] [--memlimit]', 'install' => ' ...', @@ -109,10 +110,13 @@ eval { die "command '$cmd' expects no arguments.\n" if scalar (@ARGV) != 0; print $dab->{rootfs} . "\n"; + } elsif ($cmd eq 'targetname') { + die "command '$cmd' expects no arguments.\n" if scalar (@ARGV) != 0; + print $dab->{targetname} . "\n"; } elsif ($cmd eq 'packagefile') { die "command '$cmd' expects no arguments.\n" if scalar (@ARGV) != 0; - + # FIXME: either drop this or make it compressor aware, not all end with .gz... print "$dab->{targetname}.tar.gz\n"; } elsif ($cmd eq 'list') { -- 2.39.5