#!/bin/sh wd=$(dirname $0) cd "$wd" echo "Syncing submodules..." git submodule sync --recursive echo "Updating submodules to latest upstream..." git submodule update --init --recursive --remote # 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."