Tidy the tidy script
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2018-2020 The Hush developers
|
||||||
|
# Distributed under the GPLv3 software license, see the accompanying
|
||||||
|
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||||
|
|
||||||
if [ -d "$1" ]; then
|
if [ -d "$1" ]; then
|
||||||
cd "$1"
|
cd "$1"
|
||||||
else
|
else
|
||||||
echo "Usage: $0 <datadir>" >&2
|
echo "Usage: $0 <datadir>" >&2
|
||||||
echo "Removes obsolete Bitcoin database files" >&2
|
echo "Removes obsolete Hush database files" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -16,22 +19,22 @@ if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/C
|
|||||||
|
|
||||||
case $LEVEL in
|
case $LEVEL in
|
||||||
0)
|
0)
|
||||||
echo "Error: no Bitcoin datadir detected."
|
echo "Error: no Hush datadir detected."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
echo "Detected old Bitcoin datadir (before 0.7)."
|
echo "Detected old Hush datadir (before 0.7)."
|
||||||
echo "Nothing to do."
|
echo "Nothing to do."
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
echo "Detected Bitcoin 0.7 datadir."
|
echo "Detected Hush 0.7 datadir."
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
echo "Detected Bitcoin pre-0.8 datadir."
|
echo "Detected Hush pre-0.8 datadir."
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
echo "Detected Bitcoin 0.8 datadir."
|
echo "Detected Hush 0.8 datadir."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user