echo "Folder $BASE/drupal-$1 already exists, skipping"
fi
exit
- fi
+ fi
}
# Check for non existing installations
echo "Folder $BASE/drupal-$1 does not exist, skipping"
fi
exit 1
- fi
+ fi
}
# Iterate through all drupal instances
cd $base/sites
drupals="`ls -1 -I default -I all -I example.sites.php -I '*.onion' | grep "\." | xargs`"
drupals="$drupals `ls -1 | grep '.onion$' | xargs`"
-
+
# Issue updates
for drupal in $drupals; do
if [ -e "$drupal/settings.php" ]; then
drupal_check_existing $new
drupal_check_not_existing $old
-
+
cd $BASE
-
+
# Deploy a fresh drupal tree
drupal_download $new --upgrade
# Copy files
for file in sites; do
if [ ! -h "../drupal-$old/$file" ]; then
- cp -a ../drupal-$old/$file . &> /dev/null
+ cp -alf ../drupal-$old/$file . &> /dev/null
else
# Symlink handling
ln -sf $file `readlink ../drupal-$old/$file`
cp -Rp ../drupal-$old/$extra_folder .
fi
done
-
+
# Copy installation profiles
rsync -av --exclude=default ../drupal-$old/profiles/ profiles/