#!/bin/sh
#
# @author Markus Raab <markus@libelektra.org>
# @brief Resets all custom changes in system:/elektra
# @date 02.08.2019
# @tags umount, stash, helper

if [ -z "$KDB" ]; then
	KDB=kdb
fi

fail() {
	echo "$*" 1>&2
	exit 1
}

if [ "$1" != "-f" ]; then
	fail "This is a very dangerous operation, read the man page first"
fi

"$KDB" umount-all -f
"$KDB" cache default
