mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-28 17:09:23 -05:00
1b2f1ba941
Explicit end option parsing as the shell can be quite dangerous without it.
32 lines
796 B
Bash
Executable File
32 lines
796 B
Bash
Executable File
#!/bin/sh
|
|
|
|
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
|
##
|
|
## SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
set -eu
|
|
prefix_dir="/usr"
|
|
bin_dir="${prefix_dir}/bin"
|
|
share_dir="${prefix_dir}/share/bitcoin"
|
|
share_examples_dir="${share_dir}/examples"
|
|
tmp_dir="/tmp/bitcoin-upload"
|
|
|
|
rm -rf -- "${tmp_dir}"
|
|
mkdir -p -- "${tmp_dir}"
|
|
mkdir -p -- "${share_dir}"
|
|
mkdir -p -- "${share_examples_dir}"
|
|
qfile-unpacker 0 "${tmp_dir}"
|
|
cd "${tmp_dir}"
|
|
|
|
cp -r -- bin share "${prefix_dir}"/
|
|
if test -f README.md; then
|
|
cp -r -- README.md "${share_dir}"/
|
|
fi
|
|
if test -f bitcoin.conf; then
|
|
cp -r -- bitcoin.conf "${share_examples_dir}"/
|
|
fi
|
|
cp -- share/rpcauth/rpcauth.py "${bin_dir}"/bitcoin-rpcauth
|
|
|
|
## Qube needs to shutdown for the app qube to have the uploaded files.
|
|
shutdown now
|