Skip to content

Conversation

@megri
Copy link
Contributor

@megri megri commented Nov 22, 2017

Makes cbt adhere more to the standard rules of shell scripts.

This commit

  • quotes identifiers inside test-blocks ([ … ])
  • replaces [ "$x" == "$y" ] with [ "$x" = "$y" ]
  • replaces [ "$x" == "" ] with [ -z "$x" ]
  • replaces [ "$x" != "" ] with [ -n "$x" ]
  • replaces [ ! "$x" -eq "$y" ] with [ "$x" -ne "$y" ]

Additional changes

  • replaces [ -f "$CBT_LOOP_FILE/_KILL_FILE" ] with [ -s "$CBT_LOOP_FILE/_KILL_FILE" ] to check if the file exists and has a non-zero size in an attempt to avoid looping over empty lists.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2017

CLA assistant check
All committers have signed the CLA.

@megri
Copy link
Contributor Author

megri commented Nov 22, 2017

Seems like I have to sign the CLA every time I push something... weird. Fixed

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