Skip to content

Instantly share code, notes, and snippets.

@dylan
Forked from anonymous/install_cert.bash
Last active December 18, 2015 11:59
Show Gist options
  • Save dylan/5779736 to your computer and use it in GitHub Desktop.
Save dylan/5779736 to your computer and use it in GitHub Desktop.
DIRECTORY="/usr/local/etc/openssl/certs"
download_cert() {
cd $DIRECTORY && wget http://curl.haxx.se/ca/cacert.pem
}
add_to_zsh() {
echo "export SSL_CERT_FILE=$DIRECTORY/cacert.pem" >> ~/.zshrc
}
if [ -d "$DIRECTORY" ]; then
download_cert && add_to_zsh
else
mkdir $DIRECTORY && download_cert && add_to_zsh
fi
zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment