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

clean up cbt shell script syntax #571

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

clean up cbt shell script syntax #571

wants to merge 1 commit into from

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.

None yet

2 participants