diff options
Diffstat (limited to 'bundle-update.sh')
| -rwxr-xr-x | bundle-update.sh | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/bundle-update.sh b/bundle-update.sh index 578d1e8..28d7185 100755 --- a/bundle-update.sh +++ b/bundle-update.sh @@ -1,15 +1,20 @@ #!/bin/sh wd=$(dirname $0) -path="pack/bundle/start" -branch=$(git branch --show-current) -for i in $(ls $wd/$path); do - pushd $wd/$path/$i - git pull origin $branch - popd > /dev/null -done +cd "$wd" +echo "Syncing submodules..." +git submodule sync --recursive +echo "Updating submodules to latest upstream..." +git submodule update --init --recursive --remote -cd $wd -git add . -git commit -m "Bundle update `date`" +# Clean YCM to ensure a fresh state if needed +if [ -d "pack/bundle/start/YouCompleteMe" ]; then + echo "Cleaning YouCompleteMe..." + (cd pack/bundle/start/YouCompleteMe && git clean -fdx && git checkout .) +fi + +echo "Staging changes..." +git add .gitmodules bundle-update.sh pack/bundle/start/ +git commit -m "Bundle update $(date)" +echo "Update complete." |
