set -eu
USER_STORE=/var/lib/dh-sysuser/user

home=%HOME%
username=%USERNAME%
package=%PACKAGE%

# Since according to POSIX, * glob expands to itself,
# if it fails to match anything, this function does not
# work properly, if $1 is empty.
count_files_in () {
	dir=$1
	set --
	for file in "$dir"/* ; do
		set -- "$@" "$file"
	done
	unset dir
	printf "%d" "$#"
}

store="$USER_STORE/$username"
mkdir -p "$store/_meta"
