added jrecruiter for Galdora e.K
[jprojects-scripts.git] / commit-jprojects.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh || exit 255
4
5 for project in ${LIST}; do
6         cd "${JPROJECTS_HOME}/${project}" || exit 255
7         CHECK_CHANGES=`git commit -a --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 done
22
23 echo "$0: All done."
24 exit 0