Skip to content

Instantly share code, notes, and snippets.

@davecranwell
Forked from zerolab/updatecore.sh
Last active December 11, 2015 23:08
Show Gist options
  • Save davecranwell/4674201 to your computer and use it in GitHub Desktop.
Save davecranwell/4674201 to your computer and use it in GitHub Desktop.
Updated to suit pressflow
#!/bin/bash
#
# Upgrades/Installs Pressflow (Drupal) core. Targeted at Pressflow 6
# Script based on gopressflow.sh
#
# Should be run from root folder of existing drupal installation
#
# * please backup your files before doing anything!
#
if [ -n "$1" ]; then
wget https://github.com/pressflow/6/archive/pressflow-$1.tar.gz
tar -xzvf pressflow-$1.tar.gz
rm pressflow-$1.tar.gz
else
echo "You must specify a Pressflow version as known on Github. (e.g. 6.28.111)"
exit 1
fi
mv 6-pressflow-$1 drupal-core
# mv drupal-core/*.txt ./
mv drupal-core/*.php ./
#mv .htaccess .htaccess.old
#mv drupal-core/.htaccess ./.htaccess_example
rsync -avzpP --delete drupal-core/includes ./
rsync -avzpP --delete drupal-core/misc ./
rsync -avzpP --delete drupal-core/modules ./
rsync -avzpP --delete drupal-core/profiles ./
rsync -avzpP --delete drupal-core/scripts ./
# rsync -avzpP drupal-core/sites ./
rsync -avzpP --delete drupal-core/themes ./
rm -rf drupal-core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment