fixed sudo check for creating data directories where parent folder is missing

This commit is contained in:
jash
2018-12-20 18:20:10 +01:00
committed by kexkey
parent 7dc232ed84
commit 81cf6f4e4a

10
dist/setup.sh vendored
View File

@@ -523,14 +523,14 @@ check_directory_owner() {
else
# does parent exist and do we have rw on that?
local parentDir=$(dirname $d)
echo $parentDir
while [[ ! $parentDir == '/' && ! -e $parentDir ]]; do
if [[ ! -r $parentDir || ! -w $parentDir ]]; then
status=1
break;
fi
parentDir=$(dirname $parentDir)
echo $parentDir
done
echo $parentDir
if [[ ! -r $parentDir || ! -w $parentDir ]]; then
status=1
fi
fi
done
echo $status