X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fvidwhacker;h=1496495120833e4d54e7e3c931f1e2255cfdef17;hp=aa7deb3803e46f1914c315ebdf96427367cab748;hb=07faf451b99879183ed7e909e43a0e065be1ee7f;hpb=3f438031d610c7e15fd33876a879b97e290e05fb diff --git a/hacks/vidwhacker b/hacks/vidwhacker index aa7deb38..14964951 100755 --- a/hacks/vidwhacker +++ b/hacks/vidwhacker @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# vidwhacker, for xscreensaver. Copyright (c) 1998-2005 Jamie Zawinski. +# vidwhacker, for xscreensaver. Copyright (c) 1998-2006 Jamie Zawinski. # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -21,7 +21,7 @@ use diagnostics; use strict; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.28 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my $version = q{ $Revision: 1.29 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; my $verbose = 0; my $use_stdin = 0; @@ -479,6 +479,12 @@ sub main() { read_config; + # sanity checking - is pbm installed? + # (this is a non-exhaustive but representative list) + foreach ("ppmtopgm", "pgmenhance", "pnminvert", "pnmarith", "pnmdepth") { + which ($_) || error "$_ not found on \$PATH."; + } + if (!$use_stdout) { $_ = `xdpyinfo 2>&-`; ($screen_width) =~ m/ dimensions: +(\d+)x(\d+) pixels/;