better grep pattern to catch different casing for host *

osx
Adam Veldhousen 8 years ago
parent 8120033f07
commit 22af81b6ac
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B

@ -47,7 +47,7 @@ fi
echo ""
# a check to see if they're using a config file and if it has a host setup
if [[ -f "${dest}/.ssh/config" && -z $(cat "${dest}/.ssh/config" | grep "Host \*") ]]; then
if [[ -f "${dest}/.ssh/config" && -z $(cat "${dest}/.ssh/config" | grep "[hH]ost \*")]]; then
echo "Appending ssh config"
# we append it so we don't destroy any custom settings they may have
cat "${source}/.ssh/config" >> "${dest}/.ssh/config"

Loading…
Cancel
Save