mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 18:12:21 +00:00
small fix, for users, not repo packaged.
This commit is contained in:
parent
98ed2bc4a0
commit
2d0791cc3e
29
inxi
29
inxi
|
@ -80,8 +80,8 @@ my @test = (0,0,0,0,0);
|
||||||
|
|
||||||
## Booleans
|
## Booleans
|
||||||
my ($b_arm,$b_console_irc,$b_debug_gz,$b_display,$b_dmesg_boot_check,$b_dmi,
|
my ($b_arm,$b_console_irc,$b_debug_gz,$b_display,$b_dmesg_boot_check,$b_dmi,
|
||||||
$b_dmidecode_force,$b_gpudata,$b_irc,$b_log,$b_log_colors,$b_log_full,$b_mem,
|
$b_dmidecode_force,$b_gpudata,$b_irc,$b_log,$b_log_colors,$b_log_full,$b_man,
|
||||||
$b_pci,$b_root,$b_running_in_display,$b_sysctl,$b_usb_check);
|
$b_mem,$b_pci,$b_root,$b_running_in_display,$b_sysctl,$b_usb_check);
|
||||||
## Disk checks
|
## Disk checks
|
||||||
my ($b_dm_boot_disk,$b_dm_boot_optical,$b_glabel,$b_partitions,$b_partition_extra,
|
my ($b_dm_boot_disk,$b_dm_boot_optical,$b_glabel,$b_partitions,$b_partition_extra,
|
||||||
$b_raid);
|
$b_raid);
|
||||||
|
@ -3106,7 +3106,7 @@ sub get_defaults {
|
||||||
'inxi-dev' => 'https://smxi.org/in/',
|
'inxi-dev' => 'https://smxi.org/in/',
|
||||||
'inxi-main' => 'https://github.com/smxi/inxi/raw/master/',
|
'inxi-main' => 'https://github.com/smxi/inxi/raw/master/',
|
||||||
'inxi-pinxi' => 'https://github.com/smxi/inxi/raw/inxi-perl/',
|
'inxi-pinxi' => 'https://github.com/smxi/inxi/raw/inxi-perl/',
|
||||||
'inxi-man' => "https://github.com/smxi/inxi/raw/master/$self_name.1.gz",
|
'inxi-man' => "https://smxi.org/in/$self_name.1.gz",
|
||||||
);
|
);
|
||||||
if ( exists $defaults{$type}){
|
if ( exists $defaults{$type}){
|
||||||
return $defaults{$type};
|
return $defaults{$type};
|
||||||
|
@ -3124,7 +3124,6 @@ sub update_me {
|
||||||
my $downloader_error=1;
|
my $downloader_error=1;
|
||||||
my $file_contents='';
|
my $file_contents='';
|
||||||
my $output = '';
|
my $output = '';
|
||||||
my $b_man = 0;
|
|
||||||
$self_path =~ s/\/$//; # dirname sometimes ends with /, sometimes not
|
$self_path =~ s/\/$//; # dirname sometimes ends with /, sometimes not
|
||||||
$self_download =~ s/\/$//; # dirname sometimes ends with /, sometimes not
|
$self_download =~ s/\/$//; # dirname sometimes ends with /, sometimes not
|
||||||
my $full_self_path = "$self_path/$self_name";
|
my $full_self_path = "$self_path/$self_name";
|
||||||
|
@ -3163,7 +3162,7 @@ sub update_me {
|
||||||
$output .= "Starting download of man page file now.\n";
|
$output .= "Starting download of man page file now.\n";
|
||||||
print $output;
|
print $output;
|
||||||
$output = '';
|
$output = '';
|
||||||
if ($b_man && $download_id eq 'main branch' ){
|
if ($b_man){
|
||||||
update_man();
|
update_man();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -3206,20 +3205,20 @@ sub update_man {
|
||||||
system( 'mandb' );
|
system( 'mandb' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $dl{'dl'} =~ /tiny|wget/){
|
# if ( $dl{'dl'} =~ /tiny|wget/){
|
||||||
print "Checking Man page download URL...\n";
|
# print "Checking Man page download URL...\n";
|
||||||
download_file('spider', $man_file_url);
|
# download_file('spider', $man_file_url);
|
||||||
$downloader_man_error = $?;
|
# $downloader_man_error = $?;
|
||||||
}
|
# }
|
||||||
if ( $downloader_man_error == 1 ){
|
if ( $downloader_man_error == 1 ){
|
||||||
if ( $dl{'dl'} =~ /tiny|wget/){
|
# if ( $dl{'dl'} =~ /tiny|wget/){
|
||||||
print "Man file download URL verified: $man_file_url\n";
|
# print "Man file download URL verified: $man_file_url\n";
|
||||||
}
|
# }
|
||||||
print "Downloading Man page file now.\n";
|
print "Downloading Man page file now.\n";
|
||||||
download_file('file', $man_file_url, $man_file_path );
|
download_file('file', $man_file_url, $man_file_path );
|
||||||
$downloader_man_error = $?;
|
$downloader_man_error = $?;
|
||||||
if ( $downloader_man_error == 0 ){
|
if ( $downloader_man_error == 0 ){
|
||||||
print "Oh no! Something went wrong downloading the Man gz file at: $man_file_url\n";
|
print "Oh no! Something went wrong downloading the Man file at: $man_file_url\n";
|
||||||
print "Check the error messages for what happened. Error: $downloader_man_error\n";
|
print "Check the error messages for what happened. Error: $downloader_man_error\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -3704,6 +3703,7 @@ sub get_options{
|
||||||
$self_download = get_defaults('inxi-pinxi');
|
$self_download = get_defaults('inxi-pinxi');
|
||||||
}
|
}
|
||||||
elsif ($arg && $arg eq '3'){
|
elsif ($arg && $arg eq '3'){
|
||||||
|
$b_man = 1 if $self_name eq 'inxi';
|
||||||
$download_id = 'dev server';
|
$download_id = 'dev server';
|
||||||
$self_download = get_defaults('inxi-dev');
|
$self_download = get_defaults('inxi-dev');
|
||||||
}
|
}
|
||||||
|
@ -3711,6 +3711,7 @@ sub get_options{
|
||||||
if (!$arg){
|
if (!$arg){
|
||||||
$download_id = 'main branch';
|
$download_id = 'main branch';
|
||||||
$self_download = get_defaults('inxi-main');
|
$self_download = get_defaults('inxi-main');
|
||||||
|
$b_man = 1
|
||||||
}
|
}
|
||||||
elsif ( $arg =~ /^[12]$/){
|
elsif ( $arg =~ /^[12]$/){
|
||||||
$download_id = "branch $arg";
|
$download_id = "branch $arg";
|
||||||
|
|
Loading…
Reference in a new issue