Last active
August 29, 2015 14:17
-
-
Save aschmoe/b2340e47ee95ba2f6ca2 to your computer and use it in GitHub Desktop.
Drupal helper script: If you are using some of a profile's modules in your own install profile, but don't want their makefiles to override your versioning, this will just create patches for those modules to delete them
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/sh | |
echo "List your modules with seperated by spaces (ex: panopoly_core panopoly_widgets)" | |
read -a modules | |
echo "Current branch for the set of modules you'd like (ex: 7.x-1.x)" | |
read branch | |
echo "The tag for the latest drupal project version (ex: 7.x-1.19)" | |
read tag | |
echo "Drupal issue number you'll be posting to (ex: 2453509)" | |
read issue | |
function git_task { | |
git clone --branch $branch http://git.drupal.org/project/$1.git $1 | |
cd $1 | |
git fetch | |
git checkout tags/$tag | |
git checkout . | |
rm $1.make | |
git add -u . | |
git commit -m "$issue: removing makefile for $tag" | |
git diff tags/$tag > ../../$issue-$1-remove-makefile-$tag.patch | |
echo "Made patch: $issue-$1-remove-makefile-$tag.patch" | |
cd ../ | |
} | |
# create our temp folder | |
mkdir makefiles_task | |
cd makefiles_task | |
# git clone, patch ect | |
for i in "${modules[@]}" | |
do | |
git_task $i | |
done | |
# remove our temp folder | |
cd ../ | |
rm -rf makefiles_task |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment