blob: 32a8a39a3c70e8485b343d852b6dcb95a9b40482 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
#
# Re-encrypt files to multiple recipients.
#
# Load functions
LIB="`dirname $0`/../../lib/keyringer/functions"
source $LIB
keyringer_set_env $*
# Aditional parameters
FILE="`keyringer_filename $2`"
if [ -z "$FILE" ]; then
echo "Usage: keyringer <keyring> `basename $0` <file>"
exit 1
if [ ! -f "$KEYDIR/$FILE" ]; then
echo "File not found: $KEYDIR/$FILE"
exit 1
fi
gpg --use-agent -d $KEYDIR/$FILE | gpg --use-agent --armor -e -s $(keyringer_recipients $RECIPIENTS) > $KEYDIR/$FILE
|