3 . ./.jprojects.sh || exit 255
5 for project in ${LIST}; do
6 IS_LIB="${project: -4}"
8 if [ "${project}" = "jprojects-scripts" ]
10 echo "$0: Skipping jprojects-scripts ..."
12 elif [ "${IS_LIB}" != "-lib" ]
14 echo "$0: Project '${project}' is no remote-interface project, skipped."
16 elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
18 echo "$0: Project '${project}' does not exist."
22 cd "${JPROJECTS_HOME}/${project}" || exit 255
23 CHECK_CHANGES=$(git commit -a --dry-run | grep "Changes to be committed:")
25 if [ -n "${CHECK_CHANGES}" ]
27 echo "$0: Committing '${project}' ..."
28 if [ "$1" = "updated jar(s)" ]
30 # Special commit ... (known-binaries)
31 git commit --signoff -S lib/*.jar -m "$1"
32 elif [ "$1" = "updated dist.sh" ]
34 # Special commit ... (known shell script)
35 git commit --signoff -S "dist.sh" -m "$1"
36 elif [ -n "$1" -a -n "$2" ]
38 # Limited ommit with given message
39 git commit $2 --signoff -S -m "$1" || exit 255
40 elif [ -d "$1" -o -f "$1" ]
42 # Limited commit with no message
43 git commit $1 --signoff -S || exit 255
46 # Regular commit with given message
47 git commit -a --signoff -S -m "$1" || exit 255
49 # Regular commit, will open $EDITOR for commit message
50 git commit -a --signoff -S || exit 255
53 echo "$0: Nothing to commit for project '${project}'."