Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
network:bro
bro
replace-version.pl
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File replace-version.pl of Package bro
#!/usr/bin/env perl use 5.14.1; use strict; use warnings; use Carp; my $version; my $release; { open(my $fh, '<', 'VERSION') or die ("Could not open VERSION"); local $/ = undef; my $file = <$fh>; close $fh; unless ( $file =~ m#^(\d+\.\d+(\.\d)?)(-(\d+))?# ) { croak "Cannot parse version $file"; } $version = $1; $release = $4; $release //= 0; } while ( my $line = <> ) { $line =~ s/%VERSION%/$version/g; $line =~ s/%RELEASE%/$release/g; print $line; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor