Commit 314badd9 authored by Daniel Stan's avatar Daniel Stan

importsign simplifié

parent 60a621f7
#!/bin/sh #!/bin/sh
DIR=$HOME/mail/.INBOX.GPG/cur
process() {
gpg -d $1 | sed '/-----BEGIN PGP PUBLIC KEY BLOCK-----/!d; : proc {n; /-----END PGP PUBLIC KEY BLOCK-----/!b proc}' | gpg --import
if echo "$1" | grep -vq ',S$'; then
mv $1 ${1}S
fi
}
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Give me a mail"; echo "No mail given, listing all";
exit 1; for x in $(ls "$DIR" | grep -v ",S$"); do
process "$DIR/$x"
done
else
process $1
fi fi
gpg -d $1 | sed '/-----BEGIN PGP PUBLIC KEY BLOCK-----/!d; : proc {n; /-----END PGP PUBLIC KEY BLOCK-----/!b proc}' | gpg --import
if echo "$1" | grep -vq ',S$'; then
mv $1 ${1}S
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment