]> git.proxmox.com Git - dab.git/commitdiff
add targetname command
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 Oct 2022 12:20:48 +0000 (14:20 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 Oct 2022 12:43:57 +0000 (14:43 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
dab

diff --git a/dab b/dab
index b554ae0224b1d4b6f314e0b29c1bbbe0ae3ec908..0df6306803f703e58517c64c89b481f58da37eea 100755 (executable)
--- a/dab
+++ b/dab
@@ -16,6 +16,7 @@ my $commands = {
     'veid' => '',
     'basedir' => '',
     'packagefile' => '',
+    'targetname' => '',
     'list' => '[--verbose]',
     'task' => '<postgres|mysql|php> [--version] [--password] [--memlimit]',
     'install' => '<package or *.pkglist file> ...',
@@ -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') {