#!/bin/sh
# -*- mode: sh; tab-width: 8; encoding: utf-8-unix -*-

prog=`basename $0 .bash`
PREFIX=/usr/local
ROLE=gpgkey

. /usr/local/bin/usr_local_tput.bash || exit 2

if [ "$#" -eq 0 ] ; then
    echo USAGE: $0 [options]
    cat << EOF
usage: secret-tool store --label='label' attribute value ...
       secret-tool lookup attribute value ...
       secret-tool clear attribute value ...
       secret-tool search [--all] [--unlock] attribute value ...

USAGE: $0  -- secret-tool-args
`basename $0` arguments go before the -- secret-tool args go after

EOF
    exit 1
  fi

# FixMe: nonewline
exec $PREFIX/bin/gridfire -H "secret-tool password on stdin" --stdin -- \
     secret-tool "$@"
