Last active
December 21, 2015 11:08
-
-
Save eddiemoya/6296414 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# readlink -f resolves symlinks but doesnt work on OSX or BSD. | |
# SYNC_BIN_PATH=`dirname $(readlink -f $0)` | |
# pwd is lazy, doesnt resolve symlinks, but works everywhere. | |
SYNC_BIN_PATH=$(pwd) | |
TMP_PATH="$SYNC_BIN_PATH/tmp" | |
REPO_PLUGINS="$SYNC_BIN_PATH/uxwpress/plugins/" | |
NEW_REPO_PLUGINS="$SYNC_BIN_PATH/plugins" | |
for i in `find "$REPO_PLUGINS" -maxdepth 1 -type d` | |
do | |
echo $i | |
if [ -d "$i" ]; then | |
CURRENT_PLUGIN_NAME=`basename "$i"` | |
if [ "$CURRENT_PLUGIN_NAME" == "plugins" ]; then | |
continue | |
fi | |
rm -rf "$NEW_REPO_PLUGINS/$CURRENT_PLUGIN_NAME" | |
git clone file:///home/brian/Projects/shc/uxwpress "$NEW_REPO_PLUGINS/$CURRENT_PLUGIN_NAME" | |
cd "$NEW_REPO_PLUGINS/$CURRENT_PLUGIN_NAME" | |
git filter-branch --subdirectory-filter plugins/$CURRENT_PLUGIN_NAME -- --all | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment