open correct pins/ file for beginning of model string
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 1 Dec 2017 18:55:39 +0000 (19:55 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 1 Dec 2017 18:55:39 +0000 (19:55 +0100)
gpio.pl

diff --git a/gpio.pl b/gpio.pl
index 9b02c48..ddede77 100755 (executable)
--- a/gpio.pl
+++ b/gpio.pl
@@ -79,7 +79,7 @@ while(<DATA>) {
 
 if ( ! $opt_pins && ! $pins ) {
        my $glob = $model;
-       my $glob =~ s/^(\w+).*$/$1/;
+       $glob =~ s/^(\w+).*$/$1/;
        my @pins = glob "pins/${glob}*";
        warn "# possible pins: ",dump( \@pins );
        $opt_pins = $pins[0];