summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2014-11-17 05:14:42 +0100
committerPeter Palfrader <peter@palfrader.org>2014-11-17 05:14:42 +0100
commitba650e3b422cddb460a6b4fc20043d61ea8f327b (patch)
treef4a163c1a59b9980d42c1233a89a2c84cc2506a0
parent90b175ea51cf6f45a86b7242207f9d3e92768f17 (diff)
ssh-co-dotfiles: re-pull with updated cert
-rwxr-xr-xssh-co-dotfiles45
1 files changed, 43 insertions, 2 deletions
diff --git a/ssh-co-dotfiles b/ssh-co-dotfiles
index a6d4b69..1f25160 100755
--- a/ssh-co-dotfiles
+++ b/ssh-co-dotfiles
@@ -12,7 +12,7 @@ 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 ) ) &&
+ssh "$h" 'if ! [ -e .dotfiles ] || ( [ -e .dotfiles/.svn ] && mv .dotfiles .dotfiles-svn ); then
rm -rf .dotfiles.new &&
cat > .www.palfrader.org.crt << EOF &&
-----BEGIN CERTIFICATE-----
@@ -54,5 +54,46 @@ EOF
cd .dotfiles &&
git config --local --add http.sslCAinfo "$HOME"/.dotfiles/.certs/www.palfrader.org.crt &&
./Link-Them &&
- echo "All done"'
+ echo "All done";
+ elif [ -e .dotfiles/.git ]; then
+ cat > .www.palfrader.org.crt << EOF &&
+-----BEGIN CERTIFICATE-----
+MIIFejCCBGKgAwIBAgIQToSxUkJRuXHq6GShiZ6UmTANBgkqhkiG9w0BAQsFADBf
+MQswCQYDVQQGEwJGUjEOMAwGA1UECBMFUGFyaXMxDjAMBgNVBAcTBVBhcmlzMQ4w
+DAYDVQQKEwVHYW5kaTEgMB4GA1UEAxMXR2FuZGkgU3RhbmRhcmQgU1NMIENBIDIw
+HhcNMTQwNjIzMDAwMDAwWhcNMT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0cnVzdC5jb20vR2FuZGlTdGFuZGFyZFNT
+TENBMi5jcmwwcwYIKwYBBQUHAQEEZzBlMDwGCCsGAQUFBzAChjBodHRwOi8vY3J0
+LnVzZXJ0cnVzdC5jb20vR2FuZGlTdGFuZGFyZFNTTENBMi5jcnQwJQYIKwYBBQUH
+MAGGGWh0dHA6Ly9vY3NwLnVzZXJ0cnVzdC5jb20wKwYDVR0RBCQwIoIRd3d3LnBh
+bGZyYWRlci5vcmeCDXBhbGZyYWRlci5vcmcwDQYJKoZIhvcNAQELBQADggEBADyo
+L/7Y2yOjAjEknZfHv56xPKmHztkeP4N1X1fwW63sq8ZfPtXTyF7qZHzUjN3Bg+xB
+0n6+ojl9H013QUnGc9lPcwDkGCt63bcm+WoHn7dllmvkEifHckZHk4QQup4Ni5Jw
+HE05gWdJDIxVT3VnnD9UtLN+WpzksPnNZ81HfRQJp34yGkNTd52n5lo8zmygg/96
+kXY3rh7gASx9qm2F7fc92igqDW8CbGY4sn0kOVxb4CzpiNfMUcYOC7JZRcZQynlP
+8YzlHdn+y5s1ykBpEHujhGK306SB2Z1k444mLwIk3/RLGuLMOBEeh7DE3RHE/qJK
+T/fNb04E4tA6QTx905A=
+-----END CERTIFICATE-----
+EOF
+ cd .dotfiles &&
+ git -c http.sslCAinfo="$HOME"/.www.palfrader.org.crt pull &&
+ rm -f .www.palfrader.org.crt &&
+ echo "Pulled with current cert.";
+ fi
+ '