Merge "Validate the target directory exists before linking."

This commit is contained in:
Zuul 2017-11-29 16:14:20 +00:00 committed by Gerrit Code Review
commit 0d61aaff47

View File

@ -430,6 +430,10 @@ function link_release {
if [[ -d "/opt/openstack-ansible" ]]; then
mv "/opt/openstack-ansible" "/opt/openstack-ansible.bak"
fi
if [[ ! -d "$1" ]]; then
failure "Make sure the target "$1" exists. "
exit 99
fi
ln -sf "$1" "/opt/openstack-ansible"
}