Added project 'jlandingpage' + revert-jprojects.sh
[jprojects-scripts.git] / commit-jprojects.sh
1 #!/bin/bash\r
2 \r
3 . ./.jprojects.sh || exit 255\r
4 \r
5 for project in ${LIST}; do\r
6         if [ ! -d "${JPROJECTS_HOME}/${project}" ]\r
7         then\r
8                 continue\r
9         fi\r
10 \r
11         cd "${JPROJECTS_HOME}/${project}" || exit 255\r
12         CHECK_CHANGES=`git commit -a --dry-run | grep "Changes to be committed:"`\r
13 \r
14         if [ -n "${CHECK_CHANGES}" ]\r
15         then\r
16                 echo "$0: Committing '${project}' ..."\r
17                 if [ -n "$1" ]\r
18                 then\r
19                         git commit -a --signoff -S -m "$1" || exit 255\r
20                 else\r
21                         git commit -a --signoff -S || exit 255\r
22                 fi\r
23         else\r
24                 echo "$0: Nothing to commit for project '${project}'."\r
25         fi\r
26 done\r
27 \r
28 echo "$0: All done."\r
29 exit 0\r