Commit | Line | Data |
---|---|---|
b294f6b5 MW |
1 | #! /bin/sh |
2 | ||
3 | set -e | |
4 | certroot=$(cd ${0%/*}/..; pwd) | |
5 | cd "$certroot" | |
6 | . lib/func.sh | |
7 | runas_ca | |
8 | ||
9 | badness=0 | |
10 | indices="byhash byserial" | |
11 | for i in $indices; do rm -rf index/$i; done | |
12 | for i in $indices; do mkdir index/$i.new; done | |
13 | ||
14 | for i in certs/*.cert; do | |
15 | linkserial "$i" .new | |
16 | linkhash "$i" .new | |
17 | done | |
18 | ||
19 | for i in $indices; do | |
20 | if [ -d index/$i ]; then mv index/$i index/$i.old; fi; | |
21 | done | |
22 | for i in $indices; do mv index/$i.new index/$i; done | |
23 | for i in $indices; do rm -rf index/$i.old; done |