Page MenuHomePhabricator

Shell script cleanups

Authored by Fabien on Aug 28 2019, 08:18.


Shell script cleanups:

  - Add required space to [ -n ].
  - Avoid quote within quote.
  - Exit if cd fails.
  - Remove \n which is not handled by echo.

Backport of core PR10773

Note:, and have
been deleted from our codebase.

Depends on D3955.

Test Plan

Run the scripts (build the project to test
I did not test the script which is just an
echo change, not the which is obsolete and need rework.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Aug 28 2019, 08:18
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 28 2019, 08:18
deadalnix accepted this revision.Aug 28 2019, 12:23
deadalnix added inline comments.
33 ↗(On Diff #10982)

It's probably a good idea to enforce setting various bash flags with a linter, such as set -euxo pipefail or alike.

This revision is now accepted and ready to land.Aug 28 2019, 12:23
This revision was automatically updated to reflect the committed changes.