Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Major refactor - strict mode and functions #24

Closed
wants to merge 1 commit into from

Conversation

robinbowes
Copy link

@robinbowes robinbowes commented May 17, 2018

Two main changes here:

  1. Refactor to use bash "strict" mode.
  2. Put all code in functions, with a main() entry-point.

(1) means you don't need to test every command for success - the script exits if a command fails
(2) is my preferred coding style as it it makes it very clear what the script is doing

I also added a fail() utility function.

Fixes #14

@calmh
Copy link
Owner

calmh commented May 18, 2018

You can add a (fixes #14) to this one 👍

I assume you've done what testing you can manually on this?

@robinbowes
Copy link
Author

This should now be good for testing.

I've done some testing myself (upgraded my smartoOS node) but it probably needs more.

@calmh calmh closed this Aug 19, 2019
Repository owner locked and limited conversation to collaborators Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should use "strict mode"
2 participants