Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2013 05:43
Show Gist options
  • Select an option

  • Save anonymous/5779713 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/5779713 to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Jun 14, 2013.
    17 changes: 17 additions & 0 deletions install_cert.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    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