Skip to content

Instantly share code, notes, and snippets.

@wrossmck
Last active May 19, 2016 09:49
Show Gist options
  • Save wrossmck/81b33b6b2c7fca725b1485c25df9f56b to your computer and use it in GitHub Desktop.
Save wrossmck/81b33b6b2c7fca725b1485c25df9f56b to your computer and use it in GitHub Desktop.
initialise only non-initialised git submodules
#!/bin/bash
INIT_LIST=$(git submodule status | grep "\-[a-z0-9]\{40\}" | sed 's#\(\-[a-z0-9]\{40\} \)##g')
IFS=$'\n'; for l in $INIT_LIST; do git submodule update --init $l; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment