Fix a few shellcheck issues #27

Closed
MakisH wants to merge 1 commits from MakisH/fix-26 into master
MakisH commented 2021-06-27 16:27:05 +00:00 (Migrated from github.com)

Related to https://github.com/sailfish-on-dontbeevil/flash-it/issues/26,

Right now shellcheck suggests the following, a bit more elaborate change (I can try it later):

$ shellcheck flash-it.sh 

In flash-it.sh line 221:
	LOOP_NODE=$(ls /dev/loop?p1 | cut -c10-10)
                    ^-------------^ SC2012: Use find instead of ls to better handle non-alphanumeric filenames.

For more information:
  https://www.shellcheck.net/wiki/SC2012 -- Use find instead of ls to better ...

Should I also increase the version to 0.3.4?

By the way, there is a very nice GitHub Action to catch such potential bugs: https://github.com/marketplace/actions/shellcheck
I can also add this here, if you want.

Edit: I still need to test all changes together, this is currently not working as expected.

Related to https://github.com/sailfish-on-dontbeevil/flash-it/issues/26, Right now shellcheck suggests the following, a bit more elaborate change (I can try it later): ``` $ shellcheck flash-it.sh In flash-it.sh line 221: LOOP_NODE=$(ls /dev/loop?p1 | cut -c10-10) ^-------------^ SC2012: Use find instead of ls to better handle non-alphanumeric filenames. For more information: https://www.shellcheck.net/wiki/SC2012 -- Use find instead of ls to better ... ``` Should I also increase the version to `0.3.4`? By the way, there is a very nice GitHub Action to catch such potential bugs: https://github.com/marketplace/actions/shellcheck I can also add this here, if you want. Edit: I still need to test all changes together, this is currently not working as expected.
crt0mega closed this pull request 2021-07-06 19:23:45 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.