Auto merge of #4831 - str4d:shell-cleanups, r=daira

Shell script cleanups

Cherry-picked from https://github.com/bitcoin/bitcoin/pull/10773.

Fixes a bug with `./contrib/devtools/gen-manpages.sh` backported in zcash/zcash#4827.
This commit is contained in:
Homu 2020-10-27 16:33:16 +00:00
commit b61a7e2e89
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
export LC_ALL=C
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}

View File

@ -1,7 +1,7 @@
#!/bin/bash
if [ -d "$1" ]; then
cd "$1"
cd "$1" || exit 1
else
echo "Usage: $0 <datadir>" >&2
echo "Removes obsolete Bitcoin database files" >&2

View File

@ -7,7 +7,7 @@
export LC_ALL=C
if [ $# -gt 1 ]; then
cd "$2"
cd "$2" || exit 1
fi
if [ $# -gt 0 ]; then
FILE="$1"