diff --git a/update-gitea.pl b/update-gitea.pl index 873641d..bf9d396 100644 --- a/update-gitea.pl +++ b/update-gitea.pl @@ -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