aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMatt Lenz2013-03-15 10:17:23 +1000
committerAdam Vandenberg2013-03-14 20:28:11 -0700
commit108f1fb1c8de14bb5d87a85fd24c465943c04227 (patch)
tree38f40111d3480af3666b27644612ccbf143a4ba4 /Library/Formula
parentd0f8f5182241b3b96a9aa97bc21db0bba3440a8e (diff)
downloadhomebrew-108f1fb1c8de14bb5d87a85fd24c465943c04227.tar.bz2
ssh-copy-id: patch for fish shell compatibility
Closes #18479. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ssh-copy-id.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Formula/ssh-copy-id.rb b/Library/Formula/ssh-copy-id.rb
index 54c268a17..9ab5cb2f6 100644
--- a/Library/Formula/ssh-copy-id.rb
+++ b/Library/Formula/ssh-copy-id.rb
@@ -11,4 +11,25 @@ class SshCopyId < Formula
bin.install 'contrib/ssh-copy-id'
man1.install 'contrib/ssh-copy-id.1'
end
+
+ def patches
+ # /bin/sh on the host (fixes an issue with fish shell)
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390344#10
+ DATA
+ end
end
+
+__END__
+diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
+index 9451ace..2e4e9ac 100644
+--- a/contrib/ssh-copy-id
++++ b/contrib/ssh-copy-id
+@@ -41,7 +41,7 @@ fi
+ # strip any trailing colon
+ host=`echo $1 | sed 's/:$//'`
+
+-{ eval "$GET_ID" ; } | ssh $host "umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys" || exit 1
++{ eval "$GET_ID" ; } | ssh $host "sh -c 'umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys'" || exit 1
+
+ cat <<EOF
+ Now try logging into the machine, with "ssh '$host'", and check in: