diff --git a/scripts/purge-stale-projects.sh b/scripts/purge-stale-projects.sh index 016a6310..44f880bd 100644 --- a/scripts/purge-stale-projects.sh +++ b/scripts/purge-stale-projects.sh @@ -45,6 +45,13 @@ ssh=ssh [ "$CVS_RSH" ] && ssh="$CVS_RSH" [ "$GIT_SSH" ] && ssh="$GIT_SSH" [ "$JANWARE_USER" ] || JANWARE_USER=`whoami` +ssh=`which $ssh` + +[ -x "$ssh" ] || { + echo "SSH executable \"$ssh\" not found" + exit 1 +} + ssh="$ssh -l $JANWARE_USER" local_cvs_proj=`ls -d */CVS 2>/dev/null | sed 's%/[^/]*%%'` local_git_proj=`ls -d */.git 2>/dev/null | sed 's%/[^/]*%%'`