Created attachment 145580 [details] Fix for the syntax error There's a syntax error in checkkey.sh : $ bash -n checkkey.sh checkkey.sh: line 105: syntax error near unexpected token `;' checkkey.sh: line 105: ` ;&' A patch is attached which fixes the syntax error.
Created attachment 145581 [details] Fix for the syntax errors Hmmm.. there are a couple more issues (I updated the patch): ./checkkey.sh: line 237: 1 \* 365 : syntax error: invalid arithmetic operator (error token is "\* 365 ")
(In reply to yaneurabeya from comment #0) > Created attachment 145580 [details] > Fix for the syntax error > > There's a syntax error in checkkey.sh : > > $ bash -n checkkey.sh > checkkey.sh: line 105: syntax error near unexpected token `;' > checkkey.sh: line 105: ` ;&' > > A patch is attached which fixes the syntax error. This is not a syntax error on genuine sh(1): If the selected list is terminated by the control operator `;&' instead of `;;', execution continues with the next list, continuing until a list termi- nated with `;;' or the end of the case command.
(In reply to Warren Block from comment #2) ... > This is not a syntax error on genuine sh(1): > > If the selected list is terminated by the control operator `;&' instead > of > `;;', execution continues with the next list, continuing until a list > termi- > nated with `;;' or the end of the case command. Hmmm... didn't realize that, and the docs didn't mention that I needed to run checkkey.sh on FreeBSD :/. I can submit a portable sh patch.
Actually, bash(1) says ;& is valid. bash -n (bash-4.3.22) has no complaints with it after the two backslash escapes are removed.
A commit references this bug: Author: wblock Date: Mon Aug 11 22:14:36 UTC 2014 New revision: 45437 URL: http://svnweb.freebsd.org/changeset/doc/45437 Log: Un-escape two asterisks to improve compatibility with bash. PR: 192534 Submitted by: yaneurabeya@gmail.com Changes: head/share/pgpkeys/checkkey.sh
checkkey.sh is part of the doc repository, so no MFC is needed.