Fixed regex for getting current version
This commit is contained in:
parent
0886e2da9b
commit
a7de1d6a5c
1 changed files with 5 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ $VAR1 = {
|
|||
my $gitea_bin = '/home/gitea/bin/gitea';
|
||||
my $gitea_current_version_string = `$gitea_bin --version`;
|
||||
my $gitea_current_version;
|
||||
if ( $gitea_current_version_string =~ m/ion\ (\w+)\ b/ ) {
|
||||
if ( $gitea_current_version_string =~ m/ion\ (\d+\.\d+\.\d*)\s+b/ ) {
|
||||
$gitea_current_version = $1;
|
||||
}
|
||||
printf("The version of gitea that is running is \"$gitea_current_version\"\n");
|
||||
|
|
@ -63,6 +63,10 @@ my $input = $gitea_bin;
|
|||
my $temp_out = '/home/gitea/tempout.bz';
|
||||
my $bz = new IO::Compress::Bzip2 $temp_out
|
||||
or die "bzip2 failed: $Bzip2Error\n";
|
||||
|
||||
# bzip2 $input => "$temp_out"
|
||||
# or die "bzip2 failed: $Bzip2Error\n"; # This only writes the filepath to the output
|
||||
|
||||
# bzip2 $input => "$gitea_bin_backup"
|
||||
# or die "bzip2 failed: $Bzip2Error\n"; # This works, but writes garbage to end of filename
|
||||
# need to do in OO way
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue