Last active
December 10, 2015 13:48
-
-
Save zerolab/4442952 to your computer and use it in GitHub Desktop.
Quick update Drupal core
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Upgrades/Installs Drupal core. Targeted at Drupal 6 | |
# Script based on gopressflow.sh | |
# @see https://gist.github.com/zerolab/4733662 | |
# | |
# * Run this script in your DRUPAL_ROOT | |
# * Backup your files before doing anything! | |
# | |
if [ -n "$1" ]; then | |
curl -C - -O http://ftp.drupal.org/files/projects/drupal-$1.tar.gz | |
tar -zxvf drupal-$1.tar.gz | |
rm drupal-$1.tar.gz | |
else | |
echo "You must specify a Drupal core version. (e.g. 6.27)" | |
exit 1 | |
fi | |
mv drupal-$1 drupal-core | |
# mv drupal-core/*.txt ./ | |
mv drupal-core/*.php ./ | |
mv .htaccess .htaccess.old | |
mv drupal-core/.htaccess ./ | |
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
Probably should state somewhere that this is to be run within your existing Drupal root dir