base="$BASE/drupal-$version"
if [ ! -d "$base/sites" ]; then
- break
+ continue
fi
# Setup site folders
# Issue updates
for drupal in $drupals; do
# Ignore symlinks so sites are updated just once
- if [ ! -h $drupal ]; then
+ if [ ! -h "$drupal" ]; then
echo "Processing $drupal..."
drush -l $drupal update
fi
done
# Fix permissions
- chown -R root.root $base/sites/all/modules
- chown -R root.root $base/sites/all/themes
+ if [ -e "$base/sites/all/modules" ]; then
+ chown -R root.root $base/sites/all/modules
+ fi
+ if [ -e "$base/sites/all/themes" ]; then
+ chown -R root.root $base/sites/all/themes
+ fi
done
}