Used to port over plugins to their new repos
Last active
September 23, 2015 23:27
-
-
Save balupton/632347 to your computer and use it in GitHub Desktop.
Aloha Editor Plugin Migrator
This file contains 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
<?php | |
$plugins = explode(' ','HighlightEditables GCN Format Link List Table Image Annotations'); | |
$pwd = $_SERVER['PWD']; | |
foreach ( $plugins as $plugin ) { | |
$name = "Aloha-Plugin-$plugin"; | |
$dir = "com.gentics.aloha.plugins.$plugin"; | |
$path = "WebContent/plugins/$dir"; | |
$repo = "[email protected]:alohaeditor/$name.git"; | |
echo "Setting Up: $name | |
dir: $dir | |
path: $path | |
repo: $repo\n"; | |
$commands = " | |
cd $pwd; | |
rm -Rf $name; | |
cp -Rp $pwd/Aloha-Editor $pwd/$name; | |
cd $pwd/$name; | |
git reset --hard; | |
git filter-branch --subdirectory-filter $path -- --all; | |
git remote rm origin ; | |
git remote add origin $repo ; | |
git push origin master ; | |
cd $pwd; | |
"; | |
echo $commands; | |
system($commands); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment