Skip to content

Instantly share code, notes, and snippets.

@rmamba
Last active August 29, 2015 14:06
Show Gist options
  • Save rmamba/c023f7160eda44f49539 to your computer and use it in GitHub Desktop.
Save rmamba/c023f7160eda44f49539 to your computer and use it in GitHub Desktop.
qt5checkout.sh
#!/bin/bash
# Checkout qt5 submodules to specific branch/tag
# call as 'git submodule foreach /path/to/qt5checkout.sh 5.4'
if git show-ref | grep -q refs/remotes/origin/$1 ; then
echo -e '\e[31mgit checkout ...'
git checkout "$1"
echo -e '\e[32mgit pull ...'
git pull
echo -e '\e[39m'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment