#!/bin/sh -e
readonly conf_dir="${conf_dir:-$HOME/.config/kanako}"
readonly store_dir="${store_dir:-$HOME/.kanako-store}"

if test -f "${conf_dir}"/kanako.conf; then
    . "${conf_dir}"/kanako.conf
else
    echo "Configuration file has not been found!"
    exit 1
fi

find . -name '*.enc' | sort | sed 's,^\./,,;s,\.enc$,,' | ${menu_prog} | xargs $(which kanako) -c
