Skip to content

Commit 8b8dfae

Browse files
committed
only rsync DOWNLOAD_DIR when it is not XDG_DATA_HOME/bitcoin
1 parent 76451e2 commit 8b8dfae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bails/.local/bin/install-core

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,8 @@ else
196196
fi
197197
printf '\033]2;Installing Bitcoin Core...\a'
198198
tar -xvf "${file_name::-4}" --strip-components=1 --directory=$LOCAL_DIR
199-
# Move completed verified download to persistent storage
200199
rm -Rvf "$DOWNLOAD_DIR"/{download*,*.tmp,wget-log*}
201200
until [ -f $XDG_DATA_HOME/bails/b ]; do sleep 1; done # Be sure Bails installed
202-
rsync -vh --remove-source-files --recursive "$DOWNLOAD_DIR" $XDG_DATA_HOME
203201
# Change mime association from electrum to bitcoin core
204202
sed 's/bitcoin=electrum/bitcoin=bitcoin-qt/g' /usr/share/applications/mimeinfo.cache > "$XDG_DATA_HOME/applications/mimeinfo.cache"
205203
# Configure data directory
@@ -213,6 +211,8 @@ printf "\033]2;Bitcoin Core %s complete!\a" $action
213211
if [ -e $XDG_STATE_HOME/installed ] && [ -n "$OLD_VER" ]; then
214212
zenity --info --title='Update successful' --text="${OLD_VER%Copyright*}was updated to $(bitcoind --version | head -1 | cut -d' ' -f4)" "$ICON" --icon-name=bitcoin128 &
215213
else
214+
# Move completed verified download to persistent storage
215+
rsync -vh --remove-source-files --recursive "$DOWNLOAD_DIR" $XDG_DATA_HOME
216216
mkdir -p $DATA_DIR/{wallets,blocks} # TODO: this can be replaced by creating the symlink in panic mode solution
217217
ln --symbolic --force -b /media/"$USER" $DATA_DIR/wallets # links media mount directory to wallets folder for easier loading of watch encrypted or external media wallets
218218
chmod -w $DATA_DIR/wallets # TODO: this can be deleted when panic mode is added

0 commit comments

Comments
 (0)