Skip to content

Instantly share code, notes, and snippets.

@timgluz
Created April 8, 2020 12:38
Show Gist options
  • Save timgluz/e171ad4a710f14a34649a2278be0cedd to your computer and use it in GitHub Desktop.
Save timgluz/e171ad4a710f14a34649a2278be0cedd to your computer and use it in GitHub Desktop.
pull latest changes of vim8 dependencies;
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
VIM_DIR="${HOME}/.vim/pack/timosulg/start"
# Let the person running the script know what's going on.
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
cd $VIM_DIR
# Find all git repositories and update it to the master latest revision
for i in $(ls -d */ | cut -f1 -d'/'); do
echo "";
echo -e "\033[33m"+$i+"\033[0m";
# We have to go to the .git parent directory to call the pull command
cd "$i";
# finally pull
git pull origin master;
# backto parent folder
cd ..;
done
cd $CUR_DIR
echo -e "\n\033[32mComplete!\033[0m\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment