#!/bin/sh
if [ ! -f "$targetdisk/System/Library/Keychains/X509Anchors" ]; then
"$targetdisk/usr/bin/security" create-keychain -p X509Anchors "$targetdisk/System/Library/Keychains/X509Anchors"
fi
if [ ! -f "$targetdisk/System/Library/Keychains/X509Certificates" ]; then
"$targetdisk/usr/bin/security" create-keychain -p X509Certificates "$targetdisk/System/Library/Keychains/X509Certificates"
fi
cd "$targetdisk/System/Library/Keychains/Anchors/"
"$targetdisk/usr/bin/security" add-certificate -k "$targetdisk/System/Library/Keychains/X509Anchors" *
cd "$targetdisk/System/Library/Keychains/Certificates/"
"$targetdisk/usr/bin/security" add-certificate -k "$targetdisk/System/Library/Keychains/X509Certificates" *