Verified Commit f8854d37 authored by Roman Lacko's avatar Roman Lacko
Browse files

install: do not exit with 1 when user asks for help

parent 021882b2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ GetOptions($options, qw(update cron help|h|?))
  or usage();

if ($options->{usage} || (@ARGV != 1 && !$options->{cron})) {
    usage();
    usage(0);
}

check_env();
@@ -235,6 +235,9 @@ sub print_printers {
}

sub usage {
    my ($exit_status) = @_;
    $exit_status //= 1;

    print <<END;
Script for installing faculty printers on Linux via Samba print server.
usage: $0 {--cron | [--update] <printer-name>}
@@ -248,7 +251,7 @@ END

    print_printers();

    exit 1;
    exit $exit_status;
}

sub check_python {