Fix empty
This commit is contained in:
@@ -68,9 +68,12 @@ mkdir -p ~/mnt
|
|||||||
valid_name=$( echo "$host" | sed -e 's/[^A-Za-z0-9._@-]//g')
|
valid_name=$( echo "$host" | sed -e 's/[^A-Za-z0-9._@-]//g')
|
||||||
if [[ -z "$remotepath" ]]; then
|
if [[ -z "$remotepath" ]]; then
|
||||||
if [[ -e ~/.ssh/config ]]; then
|
if [[ -e ~/.ssh/config ]]; then
|
||||||
if grep -q ^"host $host # sshfs" ~/.ssh/config; then
|
if grep -q ^"host.*$host.*# sshfs" ~/.ssh/config; then
|
||||||
# pick only string after 'sshfs'
|
# pick only string after 'sshfs'
|
||||||
remotepath=$( grep ^"host $host # sshfs" ~/.ssh/config | head -n 1 | sed "s/^host $host # sshfs //" )
|
remotepath=$( grep ^"host.*$host.*# sshfs" ~/.ssh/config \
|
||||||
|
| head -n 1 \
|
||||||
|
| sed "s/^host.*$host.*# sshfs//" \
|
||||||
|
| sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' )
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user