Removed jcontacts-ejb as this is to generic and needs to be project-dependent.
[jprojects-scripts.git] / commit-jprojects.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh || exit 255
4
5 for project in ${LIST}; do
6         cd "${project}" || exit 255
7         CHECK_CHANGES=`git commit --dry-run | grep "Changes to be committed:"`
8
9         if [ -n "${CHECK_CHANGES}" ]
10         then
11                 echo "$0: Committing '${project}' ..."
12                 if [ -n "$1" ]
13                 then
14                         git commit -a --signoff -S -m "$1" || exit 255
15                 else
16                         git commit -a --signoff -S || exit 255
17                 fi
18         else
19                 echo "$0: Nothing to commit for project '${project}'."
20         fi
21         cd -
22 done
23
24 echo "$0: All done."
25 exit 0