Improvements
[jprojects-scripts.git] / pull-stick.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh || exit 255
4
5 for project in ${LIST}; do
6         if [ ! -d "${JPROJECTS_HOME}/${project}" ]
7         then
8                 echo "$0: Project '${project}' does not exist."
9                 continue;
10         fi
11
12         cd "${JPROJECTS_HOME}/${project}" || exit 255
13
14         if [ "$1" = "c" ]
15         then
16                 echo "$0: Checkout '${project}' ..."
17                 git checkout -- .
18         fi
19
20         echo "$0: Pulling '${project}' ..."
21         git pull transport master || exit 255
22         echo "$0: Rebasing '${project}' ..."
23         git rebase origin/master || exit 255
24 done