File: makegiftoxpm.in

package info (click to toggle)
fvwmconf 0.19-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 808 kB
  • ctags: 406
  • sloc: perl: 6,191; makefile: 47; sh: 2
file content (18 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
# convert gifs to xpms
# run this in a directory to  convert 
# all the files. It also leaves the gifs unharmed
$dir = ".";
$dir = $ARGV[0] if @ARGV;
opendir DIRH , $dir;
@gifs = grep /gif|GIF/, readdir DIRH;
closedir DIRH;
print "Found " .scalar(@gifs) . " in $dir\n";
foreach $one (@gifs) {
	$two = $one;
	$two =~ s/gif/xpm/;
	$two =~ s/GIF/xpm/;
	print "cat $one | giftopnm |ppmtoxpm > $two\n";
	system "cat $one | giftopnm | ppmtoxpm > $two";
}