From f2cc227e95530303ac6407fa15039eab9cbd771a Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sat, 10 May 2008 01:21:03 +0100 Subject: [PATCH 1/1] check for ssh auth agent --- mrsetup | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mrsetup b/mrsetup index ca453ae..41173f9 100755 --- a/mrsetup +++ b/mrsetup @@ -19,24 +19,29 @@ MR_FGIT=.fgits/mr.git MR=.mr BIN_DIR=.bin +if [ -z "$SSH_AUTH_SOCK" ]; then + echo E: '$SSH_AUTH_SOCK' is not set. >&2 + exit 1 +fi + if [ ! -x "$(command -v git)" ]; then echo E: git is not installed. >&2 - exit 1 + exit 2 fi if [ -e .mrconfig ]; then echo E: .mrconfig already exists. >&2 - exit 2 + exit 3 fi if [ -d "$MR_FGIT" ]; then echo E: "$MR_FGIT" already exists. >&2 - exit 3 + exit 4 fi if [ -d ".git" ]; then echo E: .git already exists. >&2 - exit 3 + exit 5 fi if [ -d code/mr ]; then @@ -44,7 +49,7 @@ if [ -d code/mr ]; then echo W: code/mr already exists, let us hope for the best... >&2 else echo E: code/mr already exists. >&2 - exit 4 + exit 6 fi else echo I: cloning mr into ${MR_CODE}... -- 2.39.5