Page MenuHomePhabricator

Shell script cleanups
ClosedPublic

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

Details

Summary
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
https://github.com/bitcoin/bitcoin/pull/10773/files

Note: tidy_datadir.sh, gitian-build.sh and verify_commits.sh have
been deleted from our codebase.

Depends on D3955.

Test Plan

Run the scripts (build the project to test genbuild.sh).
I did not test the detached-sig-create.sh script which is just an
echo change, not the verify.sh which is obsolete and need rework.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

deadalnix added inline comments.
contrib/verifybinaries/verify.sh
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.