Deal with situation where symlinks point to non-existing directories

This commit is contained in:
ronivay
2019-01-15 15:47:26 +02:00
parent abcfd98813
commit f4146c8960

View File

@@ -327,7 +327,7 @@ function InstallXO {
# Get the commit ID of the currently-installed xen-orchestra (if one
# exists).
if [[ -L $INSTALLDIR/xo-server ]]; then
if [[ -L $INSTALLDIR/xo-server ]] && [[ ! -z $(readlink -e $INSTALLDIR/xo-server) ]]; then
cd $INSTALLDIR/xo-server
OLD_REPO_HASH=$(git rev-parse HEAD)
OLD_REPO_HASH_SHORT=$(git rev-parse --short HEAD)