#!/bin/sh

if [ -z "$XDG_CONFIG_HOME" ]; then
	XDG_CONFIG_HOME=$HOME/.config
fi

DOTDIR="$XDG_CONFIG_HOME/apricots"

mkdir -p "$DOTDIR"
cd "$DOTDIR" || exit 1

if [ ! -f apricots.cfg ]; then
	cp /usr/local/share/apricots/apricots.cfg .
fi

exec /usr/local/libexec/apricots "$@"
