Daily bump.
[official-gcc.git] / libjava / classpath / scripts / import-cacerts.sh
blob993d5847466d50c3d81d37b488abce74379a732b
1 #!/bin/sh
3 function visitFile() {
4 install/bin/gkeytool \
5 -cacert \
6 -v \
7 -storepass changeit \
8 -keystore resource/java/security/cacerts.gkr \
9 -file "$1"
12 function visitDir() {
13 local d
14 d=$1
15 for f in "$d/"*
17 if [ -d "$f" ] ; then
18 visitDir "$f"
19 else
20 visitFile "$f"
22 done
25 if [ "$#" -lt "1" ] ; then
26 echo "Usage: import-cacerts DIR"
27 echo "Import CA trusted certificates into a 'cacerts.gkr' key store"
28 echo "under resource/java/security using 'changeit' as its password,"
29 echo "and constructing the Alias from the certificate's file name."
30 echo
31 echo " DIR the 'ca-certificates' deb package installation directory"
32 echo " containing trusted CA certificates."
33 echo
34 else
35 caDir=$1
36 if [ ! -d $caDir ] ; then
37 echo "Argument MUST be a directory."
38 echo "Type command with no arguments for usage string."
39 exit 1
41 visitDir $caDir
43 exit 0