mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-29 00:16:30 +00:00
better splitting of strings
This commit is contained in:
parent
ee3005b8f7
commit
e0f8ad4a42
@ -40,12 +40,13 @@ sub run {
|
|||||||
my $fullname = $name . " Linux";
|
my $fullname = $name . " Linux";
|
||||||
|
|
||||||
my $version_id = get_var("VERSION"); # Should be the version number.
|
my $version_id = get_var("VERSION"); # Should be the version number.
|
||||||
my ($ver_major, $ver_minor) = split /\./, $version_id;
|
my $ver_major = substr($version_id, 0, index($version_id, q/./));
|
||||||
my $varstr = spell_version_number($version_id);
|
my $ver_minor = substr($version_id, index($version_id, q/./), length($version_id));
|
||||||
my $target = lc($ver_major);
|
my $target = lc($ver_major);
|
||||||
|
|
||||||
my $reltag = script_output 'rpm -q rocky-release --qf "%{RELEASE}\n"';
|
my $reltag = script_output 'rpm -q rocky-release --qf "%{RELEASE}\n"';
|
||||||
my ($relver, $eltag) = split /\./, $reltag;
|
my $relver = substr($reltag, 0, rindex($reltag, q/./));
|
||||||
|
my $eltag = substr($reltag, rindex($reltag, q/./)+1, length($reltag));
|
||||||
|
|
||||||
my $code_name = get_code_name();
|
my $code_name = get_code_name();
|
||||||
my $version = "$version_id ($code_name)";
|
my $version = "$version_id ($code_name)";
|
||||||
|
Loading…
Reference in New Issue
Block a user