Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bashttpd: QA #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

bashttpd: QA #40

wants to merge 1 commit into from

Conversation

Kreyren
Copy link

@Kreyren Kreyren commented Oct 8, 2019

Resolved shellcheck where possible left with:

Line 137:
   local code="$1"
         ^-- SC2034: code appears unused. Verify use (or export if used 
externally).

Line 181:
   local dir="$1" tree_vers tree_opts basehref x
                                      ^-- SC2034: basehref appears 
unused. Verify use (or export if used externally).

Line 186:
   read -r x tree_vers x < <(tree --version)
           ^-- SC2034: x appears unused. Verify use (or export if used 
externally).

Line 228:
      [ -r "$URL_PATH" ] && \
                         ^-- SC2015: Note that A && B || C is not 
if-then-else. C may run when A is true.

Line 231:
      [ -x "$URL_PATH" ] && \
                         ^-- SC2015: Note that A && B || C is not 
if-then-else. C may run when A is true.

Line 265:
[ -n "$REQUEST_URI" ] && \
                      ^-- SC2015: Note that A && B || C is not 
if-then-else. C may run when A is true.

Line 284:
source "${BASH_SOURCE[0]%/*}"/bashttpd.conf
       ^-- SC1090: Can't follow non-constant source. Use a directive to 
specify location.

Signed-off-by: Jacob Hrbek [email protected]

Resolved shellcheck where possible left with:
```
Line 137:
   local code="$1"
         ^-- SC2034: code appears unused. Verify use (or export if used 
externally).

Line 181:
   local dir="$1" tree_vers tree_opts basehref x
                                      ^-- SC2034: basehref appears 
unused. Verify use (or export if used externally).

Line 186:
   read -r x tree_vers x < <(tree --version)
           ^-- SC2034: x appears unused. Verify use (or export if used 
externally).

Line 228:
      [ -r "$URL_PATH" ] && \
                         ^-- SC2015: Note that A && B || C is not 
if-then-else. C may run when A is true.

Line 231:
      [ -x "$URL_PATH" ] && \
                         ^-- SC2015: Note that A && B || C is not 
if-then-else. C may run when A is true.

Line 265:
[ -n "$REQUEST_URI" ] && \
                      ^-- SC2015: Note that A && B || C is not 
if-then-else. C may run when A is true.

Line 284:
source "${BASH_SOURCE[0]%/*}"/bashttpd.conf
       ^-- SC1090: Can't follow non-constant source. Use a directive to 
specify location.
```

Signed-off-by: Jacob Hrbek <[email protected]>
@AdamDanischewski
Copy link

Line 186 is to trap the second field in tree_vers, I do the same thing in my reworked file server only version that streams multimedia: https://github.com/victrixsoft/bashbro/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants