* gpg.texi (OpenPGP Options): Clarify that personal-foo-preferences
[gnupg.git] / tools / convert-from-106
blob173793be16274feff1f4290ee7c034c41a5310cb
1 #!/bin/sh
2 # Copyright (C) 2002, 2004 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, see <http://www.gnu.org/licenses/>.
16 if ! gpg --version > /dev/null 2>&1 ; then
17 echo "GnuPG not available!"
18 exit 1
21 gpg="gpg --no-greeting --no-secmem-warning"
23 echo "This script converts your public keyring and trustdb from GnuPG"
24 echo "1.0.6 or earlier to the 1.0.7 and later format."
26 echo "If you have already done this, there is no harm (but no point)"
27 echo "in doing it again."
29 echo -n "Continue? (y/N)"
31 read answer
33 if test "x$answer" != "xy" ; then
34 exit 0
37 echo
38 echo "Marking your keys as ultimately trusted"
39 for key in `$gpg --with-colons --list-secret-keys | grep sec: | cut -d: -f5`
41 $gpg --trusted-key $key --with-colons --list-keys $key > /dev/null 2>&1
42 echo -n "."
43 done
44 echo
46 echo
47 echo "Adding signature caches"
48 $gpg --rebuild-keydb-caches
50 echo
51 echo "Checking trustdb"
52 $gpg --check-trustdb
54 echo
55 echo "Done!"