Skip to content
Snippets Groups Projects
Unverified 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
No related branches found
No related tags found
1 merge request!1Code quality improvements
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment