#!/usr/bin/expect --
# -*- mode: tcl; tab-width: 8; encoding: utf-8-unix -*-

set ROLE gpgkey
set PREFIX /usr/local

set timeout 30

spawn /g/Gpgkey/net/Http/github.com/keepassxreboot/keepassxc/releases/download/2.6.6/KeePassXC-2.6.6-x86_64.AppImage cli  db-create -p -k /dev/shm/mausPh4.key /dev/shm/mausA3d_h0.kdbx

expect "Enter password to encrypt database (optional):*"
send_user   "AA\n"
send   "AA\n"
expect   "Repeat password:*"
send_user   "AA\n"
send   "AA\n"

expect -re .+ {
    exp_continue
  } timeout {
    exit 1
  } eof {
    exit 0
  }

# expect -r .+ {send "\r"}
