nixpkgs/pkgs/applications/networking/p2p/freenet/freenetWrapper
Chris Double 2756b088d8 Update freenet to build 1470.
This stores freenet data files in ~/.local/share/freenet by default,
or $XDG_DATA_HOME/freenet if set.
2015-10-25 18:46:09 +13:00

16 lines
371 B
Bash
Executable file

#! /usr/bin/env bash
export FREENET_HOME="$HOME/.local/share/freenet"
if [ -n "$XDG_DATA_HOME" ]
then export FREENET_HOME="$XDG_DATA_HOME/freenet"
fi
if [ ! -d $FREENET_HOME ]; then
mkdir -p $FREENET_HOME
fi
cp -u $FREENET_SEEDNODES $FREENET_HOME/seednodes.fref
chmod u+rw $FREENET_HOME/seednodes.fref
cd $FREENET_HOME
exec $FREENET_ROOT/bin/freenet.wrapped "$@"