Skip to content

Instantly share code, notes, and snippets.

@kostajh
Created February 23, 2012 18:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kostajh/1894250 to your computer and use it in GitHub Desktop.
Save kostajh/1894250 to your computer and use it in GitHub Desktop.
Abandon install profile
// Site specific options
$options['destination'] = 'sites/all/modules/contrib';
// Site specific options
$options['destination'] = 'profiles/my_profile/modules/contrib';
# Run from the root of your site directory
export $PROFILE="my_profile"
mv "profiles/$PROFILE/modules/contrib/" sites/all/modules/contrib
mv "profiles/$PROFILE/modules/custom/" sites/all/modules/custom
mv "profiles/$PROFILE/themes/*" sites/all/themes/
-- Update contrib modules location
UPDATE system SET filename = REPLACE(filename,'profiles/myprofile/modules/contrib','sites/all/modules/contrib');
UPDATE registry SET filename = REPLACE(filename,'profiles/myprofile/modules/contrib','sites/all/modules/contrib');
UPDATE registry_file SET filename = REPLACE(filename,'profiles/myprofile/modules/contrib','sites/all/modules/contrib');
-- Update custom modules location
UPDATE system SET filename = REPLACE(filename,'profiles/myprofile/modules/custom','sites/all/modules/custom');
UPDATE registry SET filename = REPLACE(filename,'profiles/myprofile/modules/custom','sites/all/modules/custom');
UPDATE registry_file SET filename = REPLACE(filename,'profiles/myprofile/modules/custom','sites/all/modules/custom');
-- Update themes location
UPDATE system SET filename = REPLACE(filename,'profiles/myprofile/themes','sites/all/themes');
UPDATE registry SET filename = REPLACE(filename,'profiles/myprofile/themes','sites/all/themes');
UPDATE registry_file SET filename = REPLACE(filename,'profiles/myprofile/themes','sites/all/themes');
-- Truncate cache
TRUNCATE cache;
TRUNCATE cache_bootstrap;
TRUNCATE cache_path;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment