The last commit from my workplace removed push-stick.sh, which was not intended.
[jprojects-scripts.git] / checkout-jprojects.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh || exit 255
4
5 TARGET_BRANCH="master"
6
7 for project in ${LIST}; do
8         echo "$0: Processing '${project}' ..."
9         cd "${JPROJECTS_HOME}/${project}"
10
11         # Checkout all
12         git checkout -- .
13
14         if [ -n "${TARGET_BRANCH}" ]
15         then
16                 echo "$0: Switching back to '${TARGET_BRANCH}'"
17                 git checkout "${TARGET_BRANCH}"
18         fi
19 done
20
21 echo "$0: All done."
22 exit 0