Ticket #29730: tortoisehg_ssh-askpass.diff
File tortoisehg_ssh-askpass.diff, 1.3 KB (added by shiena.jp@…, 13 years ago) |
---|
-
files/macos-askpass
1 #! /bin/sh 2 3 # 4 # An SSH_ASKPASS command for MacOS X 5 # 6 # Author: Joseph Mocker, Sun Microsystems 7 8 # 9 # To use this script: 10 # setenv SSH_ASKPASS "macos-askpass" 11 # setenv DISPLAY ":0" 12 # 13 14 TITLE=${MACOS_ASKPASS_TITLE:-"SSH"} 15 16 DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\"" 17 DIALOG="$DIALOG with icon caution with hidden answer" 18 19 result=`osascript -e 'tell application "Finder"' -e "activate" -e "$DIALOG" -e 'end tell'` 20 21 if [ "$result" = "" ]; then 22 exit 1 23 else 24 echo "$result" | sed -e 's/^text returned://' -e 's/, button returned:.*$//' 25 exit 0 26 fi 27 -
files/TortoiseHg.in
Property changes on: files/macos-askpass ___________________________________________________________________ Added: svn:executable + *
1 1 #!/bin/bash 2 2 3 if [ -z "$SSH_ASKPASS" ]; then 4 SSH_ASKPASS=`dirname $0`/macos-askpass 5 export SSH_ASKPASS 6 fi 7 3 8 exec "@PREFIX@/bin/thg"