SVN: vfmg/trunk/VFMG/Icons.pm
sparky
sparky at pld-linux.org
Tue Dec 5 02:27:51 CET 2006
Author: sparky
Date: Tue Dec 5 02:27:50 2006
New Revision: 8063
Modified:
vfmg/trunk/VFMG/Icons.pm
Log:
- convert_post script, usefull for cleaning up
Modified: vfmg/trunk/VFMG/Icons.pm
==============================================================================
--- vfmg/trunk/VFMG/Icons.pm (original)
+++ vfmg/trunk/VFMG/Icons.pm Tue Dec 5 02:27:50 2006
@@ -53,7 +53,7 @@
if ( $main::opt{convert} =~ s/^\s*\$(\S+)\s+// ) {
my $sect = $1;
my $conv = prepare_exec($sect);
- if ( defined $conv and length $conv and -x $conv ) {
+ if ( defined $conv and length $conv ) {
$main::opt{convert} =~ s/^/$conv /;
$main::opt{icons} = 1;
} else {
@@ -69,6 +69,24 @@
warn "$conv is not executable, not scaling icons.\n";
}
}
+ return unless $main::opt{icons_scale};
+
+ return unless exists $main::opt{convert_post};
+ if ( $main::opt{convert_post} =~ s/^\s*\$(\S+)\s+// ) {
+ my $sect = $1;
+ my $post = prepare_exec($sect);
+ if ( defined $post and length $post ) {
+ $main::opt{convert_post} =~ s/^/$post /;
+ } else {
+ warn "Some error ocurred wile preparing post '\$$sect' script\n";
+ delete $main::opt{convert_post};
+ }
+ } else {
+ unless ( length `which $main::opt{convert_post}` ) {
+ delete $main::opt{convert_post};
+ warn "post: $main::opt{convert_post} is not executable.\n";
+ }
+ }
return;
}
@@ -159,3 +177,5 @@
}
1;
+
+# vi: ts=4 sw=4 noet fdm=marker
More information about the pld-cvs-commit
mailing list