updated git and svn scripts
[xrzperl.git] / r-fbset
blobe65891ade4c38811286dcfe61163fc4273827049
1 #!/usr/bin/perl -w
2 ###APPNAME: r-fbset
3 ###APPAUTHOR: duel
4 ###APPDATE: Wed May 5 19:26:14 2010
5 ###APPVER: 0.1
6 ###APPDESC: r-fbset
7 ###APPUSAGE:
8 ###APPEXAMPLE: r-fbset
9 ###APPOPTION:
10 use strict;
12 #ENV variable MUST be defined somewhere,
13 #FOR perl to search modules from,
14 #OR nothing will work
15 use lib $ENV{XR_PERL_MODULE_DIR};
17 use MyPlace::Script::Usage qw/help_required help_even_empty/;
18 exit 0 if(help_required($0,@ARGV));
19 #exit 0 if(help_even_empty($0,@ARGV));
21 my $app="fbset";
23 exec($app) unless(@ARGV);
25 my ($xres,$yres,$depth,$rate) = qw/1024 768 16 60/;
26 my @args;
27 foreach(@ARGV) {
28 if($_ =~ /^(\d+)[xX](\d+)$/) {
29 $xres = $1;
30 $yres = $2;
32 elsif($_ =~ /^(\d+)[xX](\d+)-(\d+)$/) {
33 $xres = $1;
34 $yres = $2;
35 $depth = $3;
37 elsif($_ =~ /^(\d+)[xX](\d+)-(\d+)\@(\d+)$/) {
38 $xres = $1;
39 $yres = $2;
40 $depth = $3;
41 $rate = $4;
43 else {
44 push @args,$_;
47 @args = ("-xres",$xres,"-yres",$yres,"-depth",$depth,@args);
48 print STDERR join(" ",($app,@args)),"\n";
49 exec($app,@args);