Bug 1204516 - Ignore missing directories when changing ownership of cache directories in build.sh. r=dustin

This commit is contained in:
Mike Hommey 2016-02-10 15:09:22 +09:00
Родитель 62784ad09c
Коммит 8c6f9cfce8
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -8,9 +8,11 @@ if [ $(id -u) = 0 ]; then
# each of the caches we have mounted are owned by root, so update that ownership
# to 'worker'
for cache in /home/worker/.tc-vcs /home/worker/workspace /home/worker/tooltool-cache; do
# -R probably isn't necessary forever, but it fixes some poisoned
# caches for now
chown -R worker:worker $cache
if [ -d $cache ]; then
# -R probably isn't necessary forever, but it fixes some poisoned
# caches for now
chown -R worker:worker $cache
fi
done
# ..then drop privileges by re-running this script