#!/bin/sh set -e set -u if [ "$#" != 1 ]; then echo >&2 "Usage: $0 " exit 1 fi h="$1" #echo "Expect svn cert fingerprint to be" #echo " 66:ab:46:50:ce:21:a5:4a:36:8c:82:0e:77:81:34:d5:53:10:d0:99" echo ssh "$h" '(! [ -e .dotfiles ] || ( [ -e .dotfiles/.svn ] && mv .dotfiles .dotfiles-svn ) ) && rm -rf .dotfiles.new && mkdir -p .dotfiles/.certs && cat > .dotfiles/.certs/www.palfrader.org.crt << EOF && -----BEGIN CERTIFICATE----- MIIFYzCCBEugAwIBAgIQJMKGOvTFJfamxTl+S7YAQzANBgkqhkiG9w0BAQUFADBB MQswCQYDVQQGEwJGUjESMBAGA1UEChMJR0FOREkgU0FTMR4wHAYDVQQDExVHYW5k aSBTdGFuZGFyZCBTU0wgQ0EwHhcNMTQwNjIzMDAwMDAwWhcNMTYwNjIzMjM1OTU5 WjBcMSEwHwYDVQQLExhEb21haW4gQ29udHJvbCBWYWxpZGF0ZWQxGzAZBgNVBAsT EkdhbmRpIFN0YW5kYXJkIFNTTDEaMBgGA1UEAxMRd3d3LnBhbGZyYWRlci5vcmcw ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC8oPtzgAShwDQxpqeuA/md iBd4mwA+vCsvrQD058zO7ttQO+XKsUZ6Bv6BSitMLJiGrn45fcwkn1meXDgYf65E yFw6LJXT7EFs6axtqkvpV4flVI7oWwG720l2fThHO/Z7iMNuorPxJcM39zzt5GtE HKMq1dP+YWn6OF0mi7cbGu950PT2ueuO1hF0TAWCK5LuRf3vwKqbhBL0EMwcMqpG 7h5WxcxdX3tRIlwG8OoDGw/u1v4WCyU1KY4qGmtWvuW5+jzHR5gkIgYJzhBcwpQP qzGrHm7c8cjBV5S6b8XvyGMQ0SrEe6ex8kip/Wuh8aAg5iXK3+EJIadAGvGoBxZc O6hiQNoUDRjw8qbq813sPpkskosGvQsxbi+0Rqp3Xw67JaKAXZdnbDY9Gj3XqMrI SXeKvFTUKsS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z -----END CERTIFICATE----- EOF git -c http.sslCAinfo=/home/weasel/.dotfiles/.certs/www.palfrader.org.crt clone https://www.palfrader.org/git/conf/dotfiles.git .dotfiles.new && rm -rf .dotfiles && mv .dotfiles.new .dotfiles && cd .dotfiles && git config --local --add http.sslCAinfo /home/weasel/.dotfiles/.certs/www.palfrader.org.crt && ./Link-Them && echo "All done"'