3 . ./.jprojects.sh || exit 255
5 for project in ${LIST}; do
6 if [ "${project}" = "jprojects-scripts" ]
8 echo "$0: Skipping jprojects-scripts ..."
10 elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
12 echo "$0: Project '${project}' does not exist."
16 cd "${JPROJECTS_HOME}/${project}" || exit 255
17 CHECK_CHANGES=$(git commit -a --dry-run | grep "Changes to be committed:")
19 if [ -n "${CHECK_CHANGES}" ]
21 echo "$0: Committing '${project}' ..."
22 if [ "$1" = "updated jar(s)" ]
24 # Special commit ... (known-binaries)
25 git commit --signoff -S lib/*.jar -m "$1"
26 elif [ "$1" = "updated dist.sh" ]
28 # Special commit ... (known shell script)
29 git commit --signoff -S "dist.sh" -m "$1"
30 elif [ -n "$1" -a -n "$2" ]
32 # Regular commit with given message
33 git commit $2 --signoff -S -m "$1" || exit 255
34 elif [ -d "$1" -o -f "$1" ]
36 # Limited commit with no message
37 git commit $1 --signoff -S || exit 255
40 # Regular commit with given message
41 git commit -a --signoff -S -m "$1" || exit 255
43 # Regular commit, will open $EDITOR for commit message
44 git commit -a --signoff -S || exit 255
47 echo "$0: Nothing to commit for project '${project}'."