- mkdir -p ~/temp/tests
- git config --global user.name 'Test'
- git config --global user.email 'test@example.org'
- - ./keyringer test init ~/temp/tests/keyringer
+ - KEYRINGER_NON_INTERACTIVE=1 ./keyringer test init ~/temp/tests/keyringer
- gpg --with-colons --list-keys | grep uid | awk -F ':' '{ x = $10; gsub(/.*</, "", x); gsub(/>/, "", x); print x, $8; }' >> ~/temp/tests/keyringer/config/recipients/default
- ./keyringer test check
- ./keyringer test teardown -y
fi
# Edit default recipients
- echo "Now you have to edit the default recipient configuration to be able to encrypt secrets."
- echo "Press any key to proceed editing..."
- read key
- keyringer_exec recipients "$BASEDIR" edit default
+ if [ "$KEYRINGER_NON_INTERACTIVE" != "1" ]; then
+ echo "Now you have to edit the default recipient configuration to be able to encrypt secrets."
+ echo "Press any key to proceed editing..."
+ read key
+ keyringer_exec recipients "$BASEDIR" edit default
+ fi
# Stage and commit
keyringer_exec git "$BASEDIR" add .