diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-10-04 21:19:45 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-10-18 17:09:36 +0200 |
commit | 1e44ae0e198b0bc3c4363774a27a3e72a5c2a47b (patch) | |
tree | dd31098a6ed363911b6384a11455dd8977e4d4ca /contrib/tidy_datadir.sh | |
parent | b9e79ab415996964cfdfaaa0f8dddbcda8aa7d32 (diff) |
Add error handling: exit if cd fails
Diffstat (limited to 'contrib/tidy_datadir.sh')
-rwxr-xr-x | contrib/tidy_datadir.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh index 8960f8811d..b845b34e41 100755 --- a/contrib/tidy_datadir.sh +++ b/contrib/tidy_datadir.sh @@ -4,7 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. if [ -d "$1" ]; then - cd "$1" + cd "$1" || exit 1 else echo "Usage: $0 <datadir>" >&2 echo "Removes obsolete Bitcoin database files" >&2 |