5
0
mirror of git://git.proxmox.com/git/pve-docs.git synced 2025-10-28 20:23:44 +03:00
Files
pve-docs/png-verify.pl
Thomas Lamprecht bdcb3649fe auto-format code using perltidy with Proxmox style guide
using the new top-level `make tidy` target, which calls perltidy via
our wrapper to enforce the desired style as closely as possible.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-31 06:37:13 +02:00

29 lines
648 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
my $installer_images = {
'pve-grub-menu.png' => 1,
'pve-installation.png' => 1,
'pve-select-location.png' => 1,
'pve-select-target-disk.png' => 1,
'pve-set-password.png' => 1,
'pve-setup-network.png' => 1,
};
my $infile = shift
|| die "no input file specified\n";
my $basename = basename($infile);
my $dpcm = $installer_images->{$basename} ? 72 : 58; # expected
my $tmp = `identify -units PixelsPerCentimeter -format '%x x %y' $infile`;
die "$infile: got unexpected density '$tmp' (fix with png-cleanup.pl)\n"
if $tmp ne "$dpcm x $dpcm";
exit 0;