DIR : /home/kozerus/public_html/piwigo/tools/replace_version.pl
/home/kozerus/public_html/piwigo/tools
#!/usr/bin/perl
####
# Usage
#
# perl replace_version.pl --file=/path/to/file.php --version=2.8.0
use strict;
use warnings;
use Getopt::Long;
use File::Basename;
my %opt = ();
GetOptions(
\%opt,
qw/
file=s
version=s
/
);
if (not -e $opt{file}) {
die "file missing ".$opt{file};
}
my $new_content = '';
open(my $ifh, '<'.$opt{file}) or die 'Houston, problem with "'.$opt{file}.'" for reading';
while (<$ifh>) {
if (/^Version:/) {
$_ = 'Version: '.$opt{version}.''."\n";
}
$new_content.= $_;
}
close($ifh);
open(my $ofh, '>'.$opt{file}) or die 'Houston, problem with "'.$opt{file}.'" for writing';
print {$ofh} $new_content;
close($ofh);
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer