case "$ACTION" in
post)
	for _file in usr/share/rime-data/build/*.schema.yaml
	do
		_filename=${_file##*/}
		if [ ! -f "usr/share/rime-data/$_filename" ]; then
			_basename=${_file%.schema.yaml}
			rm -f "$_file"
			rm -f "${_basename}.prism.bin"
			rm -f "${_basename}.reverse.bin"
			rm -f "${_basename}.table.bin"
		fi
	done
	rm -f usr/share/rime-data/build/default.yaml
	rmdir usr/share/rime-data/build >/dev/null 2>&1 || true
	rm -f usr/share/rime-data/user.yaml
	if ! rmdir usr/share/rime-data >/dev/null 2>&1 &&
		[ -x usr/bin/rime_deployer ]
	then
		usr/bin/rime_deployer --build usr/share/rime-data
	fi
	;;
esac
