Skip to content

Instantly share code, notes, and snippets.

@timuruski
Created September 14, 2011 15:15
Show Gist options
  • Select an option

  • Save timuruski/1216842 to your computer and use it in GitHub Desktop.

Select an option

Save timuruski/1216842 to your computer and use it in GitHub Desktop.
A command line that walks vim/bundle directory and adds each git-submodule.
#! /bin/bash
find vim/bundle -name "config" | grep .git | while read d; do echo "submodule add " $(grep "url = " $d | awk '{print $3}') $(echo $d | sed -e "s/\.git\/config//") | xargs git; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment