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

prog=`basename $0 .bash`
PREFIX=/usr/local
ROLE=gpgkey
DEBUG=1
. /usr/local/bin/usr_local_tput.bash
. /usr/local/bin/gridfire.rc

usage () {
    echo USAGE: $0 [options]
    cat << EOF
USAGE: $0 [--arg password ] -- truecrypt-args
`basename $0` arguments go before the -- truecrypt args go after
MINIMUM of 2 args for truecrypt
EOF
    exit 1
}
if [ "$#" -eq 0 ] ; then
    usage
  fi
if [ "$#" -lt 2 ] ; then
    usage
  fi

tail=`echo $@ | sed -e 's/.* \([^ ]*\) \([^ ]*\)/\1 \2/'`
RARGS="--non-interactive"
exec $PREFIX/bin/gridfire --double password -E -B -H "truecrypt-console $tail" -- \
     $PREFIX/bin/truecrypt-console.sh $RARGS "$@"

# FixMe:   --new-password=<str>       	New password
