# HG changeset patch # User Jeff Hammel # Date 1389918772 28800 # Node ID 1e1db18fb7fa557889b287b50056930678b6aacd # Parent 980fd762e3546a43278efa924e088948a0938f85 STUB: bin/setup-X.sh diff -r 980fd762e354 -r 1e1db18fb7fa bin/setup-X.sh --- a/bin/setup-X.sh Thu Jan 16 15:32:55 2014 -0800 +++ b/bin/setup-X.sh Thu Jan 16 16:32:52 2014 -0800 @@ -24,11 +24,15 @@ # ssh-add if [[ `ssh-add -l` != *id_?sa* ]] then - SSH_ASKPASS=/usr/bin/ksshaskpass - if [[ -e $SSH_ASKPASS ]] + GUI_SSH_ASKPASS=/usr/bin/ksshaskpass + if [[ -e "${GUI_SSH_ASKPASS}" ]] then - SSH_ASKPASS=${SSH_ASKPASS} ssh-add + SSH_ASKPASS=${GUI_SSH_ASKPASS} ssh-add + elif [[ -z "$PS1" ]] + # http://www.cyberciti.biz/faq/linux-unix-bash-check-interactive-shell/ + + echo "not running ssh-add: PS1 not found" else - echo "not running ssh-add: ${SSH_ASKPASS} not found" + ssh-add # interactive terminal fi fi \ No newline at end of file