Skip to content

Commit

Permalink
Create datadir wrapper for all bins
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Aug 28, 2019
1 parent e7d1fe6 commit 4e60934
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
3 changes: 0 additions & 3 deletions bitcoin-qt_wrapper.sh

This file was deleted.

8 changes: 8 additions & 0 deletions install_wrappers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/bash

for b in bitcoin{d,-qt,-cli}
do
echo '#!/usr/bin/bash' > /app/bin/$b
echo "exec /app/bin/internal/$b" '-datadir="${XDG_DATA_HOME}" "$@"' >> /app/bin/$b
chmod 744 /app/bin/$b
done
2 changes: 1 addition & 1 deletion org.bitcoincore.bitcoin-qt.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Comment=Connect to the Bitcoin P2P Network
Comment[de]=Verbinde mit dem Bitcoin peer-to-peer Netzwerk
Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
Exec=bitcoin-qt_wrapper.sh %u
Exec=bitcoin-qt %u
Terminal=false
Type=Application
Icon=org.bitcoincore.bitcoin-qt
Expand Down
16 changes: 8 additions & 8 deletions org.bitcoincore.bitcoin-qt.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"runtime": "org.freedesktop.Platform",
"sdk": "org.freedesktop.Sdk",
"runtime-version": "18.08",
"command": "bitcoin-qt_wrapper.sh",
"command": "bitcoin-qt",
"finish-args": [
/* Wayland and Xorg support */
"--socket=x11",
Expand All @@ -22,13 +22,13 @@
"name": "bitcoin-core",
"buildsystem": "simple",
"build-commands": [
"install -m 0744 -D -t /app/bin bin/bitcoind",
"install -m 0744 -D -t /app/bin bin/bitcoin-qt",
"install -m 0744 -D -t /app/bin bin/bitcoin-cli",
"install -m 0744 -D -t /app/bin bin/test_bitcoin"
"install -m 0744 -D -t /app/bin/internal bin/bitcoind",
"install -m 0744 -D -t /app/bin/internal bin/bitcoin-qt",
"install -m 0744 -D -t /app/bin/internal bin/bitcoin-cli",
"install -m 0744 -D -t /app/bin/internal bin/test_bitcoin"
],
"post-install": [
"/app/bin/test_bitcoin"
"/app/bin/internal/test_bitcoin"
],
"sources": [
{
Expand Down Expand Up @@ -65,7 +65,7 @@
"install -Dp -m 644 org.bitcoincore.bitcoin-qt.desktop /app/share/applications/org.bitcoincore.bitcoin-qt.desktop",
"install -Dp -m 644 bitcoin.svg /app/share/icons/hicolor/scalable/apps/org.bitcoincore.bitcoin-qt.svg",
"install -Dp -m 644 org.bitcoincore.bitcoin-qt.appdata.xml /app/share/metainfo/org.bitcoincore.bitcoin-qt.appdata.xml",
"install -Dp -m 744 bitcoin-qt_wrapper.sh /app/bin/bitcoin-qt_wrapper.sh"
"bash install_wrappers.sh"

],
"sources": [
Expand All @@ -84,7 +84,7 @@
},
{
"type": "file",
"path": "bitcoin-qt_wrapper.sh"
"path": "install_wrappers.sh"
}

]
Expand Down

0 comments on commit 4e60934

Please sign in to comment.