diff options
author | Roni Hokkanen | 2022-10-01 03:05:33 +0300 |
---|---|---|
committer | Roni Hokkanen | 2022-10-01 03:05:33 +0300 |
commit | 604d4db11a73535004193ee7536d0143cfb318cf (patch) | |
tree | d90796499c92cde17f68bbf65617b1ce4d477d4c /ergo-node | |
download | aur-604d4db11a73535004193ee7536d0143cfb318cf.tar.gz |
Add initial version of the package. I might add a basic man page later.
Diffstat (limited to 'ergo-node')
-rwxr-xr-x | ergo-node | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ergo-node b/ergo-node new file mode 100755 index 000000000000..2fc2abb054a2 --- /dev/null +++ b/ergo-node @@ -0,0 +1,23 @@ +#!/bin/sh +# Ergo node normally writes all its data in the current working directory +# This is a wrapper script to make Ergo node use Xdg base directories +if [ -z $XDG_DATA_HOME ]; then + DATA_DIR=~/.local/share/ergo-node +else + DATA_DIR=$XDG_DATA_HOME/ergo-node +fi +if [ -z $XDG_CONFIG_HOME ]; then + CONFIG_DIR=~/.config/ergo-node +else + CONFIG_DIR=$XDG_CONFIG_HOME/ergo-node +fi + +mkdir -p $DATA_DIR +mkdir -p $CONFIG_DIR +if ! [ -f $CONFIG_DIR/local.conf ]; then + # Copy sample config file if the user hasn't created one + cp /usr/share/ergo-node/local.conf.sample $CONFIG_DIR/local.conf +fi + +cd $DATA_DIR +java -jar /usr/share/ergo-node/ergo.jar --mainnet -c $CONFIG_DIR/local.conf "$@" |