if ~/.ssh does not exist and cannot be created, avoid failing
This commit is contained in:
parent
10afac3fba
commit
911335247c
2 changed files with 24 additions and 20 deletions
|
@ -31,6 +31,7 @@ cd "$orig"
|
|||
# assistant.
|
||||
if [ ! -e "$HOME/.ssh/git-annex-shell" ]; then
|
||||
mkdir "$HOME/.ssh" >/dev/null 2>&1 || true
|
||||
if [ -e "$HOME/.ssh" ]; then
|
||||
(
|
||||
echo "#!/bin/sh"
|
||||
echo "set -e"
|
||||
|
@ -42,6 +43,7 @@ if [ ! -e "$HOME/.ssh/git-annex-shell" ]; then
|
|||
) > "$HOME/.ssh/git-annex-shell"
|
||||
chmod +x "$HOME/.ssh/git-annex-shell"
|
||||
fi
|
||||
fi
|
||||
|
||||
# And this shim is used by the webapp when adding a remote ssh server.
|
||||
if [ ! -e "$HOME/.ssh/git-annex-wrapper" ]; then
|
||||
|
|
|
@ -33,6 +33,7 @@ cd "$orig"
|
|||
# assistant.
|
||||
if [ ! -e "$HOME/.ssh/git-annex-shell" ]; then
|
||||
mkdir "$HOME/.ssh" >/dev/null 2>&1 || true
|
||||
if [ -e "$HOME/.ssh" ]; then
|
||||
(
|
||||
echo "#!/bin/sh"
|
||||
echo "set -e"
|
||||
|
@ -44,6 +45,7 @@ if [ ! -e "$HOME/.ssh/git-annex-shell" ]; then
|
|||
) > "$HOME/.ssh/git-annex-shell"
|
||||
chmod +x "$HOME/.ssh/git-annex-shell"
|
||||
fi
|
||||
fi
|
||||
|
||||
# And this shim is used by the webapp when adding a remote ssh server.
|
||||
if [ ! -e "$HOME/.ssh/git-annex-wrapper" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue