#!/bin/bash

set -e

[ -d "$statedir" ]
cafile="$statedir/java-cacerts"
cafile_gcj="$statedir/gcj-cacerts"


for i in "$@"; do
	if [ "$i" = "-f" ]; then
		fresh=1
	elif [ "$i" = "-v" ]; then
		verbose=1
	fi
done

[ -z "$verbose" ] || echo "creating $cafile ..."
trust extract --format=java-cacerts --purpose=server-auth --filter=ca-anchors --overwrite $cafile.new
mv $cafile.new $cafile

# vim: syntax=sh
