Browse Source

Add error handling: exit if cd fails

tags/v0.16.1
practicalswift 3 years ago
parent
commit
1e44ae0e19
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      contrib/tidy_datadir.sh
  2. 1
    1
      contrib/verifybinaries/verify.sh
  3. 1
    1
      share/genbuild.sh

+ 1
- 1
contrib/tidy_datadir.sh View File

@@ -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

+ 1
- 1
contrib/verifybinaries/verify.sh View File

@@ -33,7 +33,7 @@ if [ ! -d "$WORKINGDIR" ]; then
mkdir "$WORKINGDIR"
fi

cd "$WORKINGDIR"
cd "$WORKINGDIR" || exit 1

#test if a version number has been passed as an argument
if [ -n "$1" ]; then

+ 1
- 1
share/genbuild.sh View File

@@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

if [ $# -gt 1 ]; then
cd "$2"
cd "$2" || exit 1
fi
if [ $# -gt 0 ]; then
FILE="$1"

Loading…
Cancel
Save