added error message about missing pins/ file
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 19 Apr 2018 18:48:32 +0000 (18:48 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 19 Apr 2018 18:48:32 +0000 (18:48 +0000)
gpio.pl

diff --git a/gpio.pl b/gpio.pl
index 6702865..f0c93d6 100755 (executable)
--- a/gpio.pl
+++ b/gpio.pl
@@ -83,6 +83,7 @@ if ( ! $opt_pins && ! $pins ) {
        my $glob = $model;
        $glob =~ s/^(\w+).*$/$1/;
        my @pins = glob "pins/${glob}*";
+       die "pins/${glob} NOT FOUND for this board, please create one and contribute" unless @pins;
        warn "# possible pins: ",dump( \@pins );
        $opt_pins = $pins[0];
        goto OPEN_PINS_AGAIN;