Some fixes:
[jprojects-scripts.git] / commit-jprojects.sh
index 99f58bdb05bc5d005d0046bf208d5220ef749660..deff10f8ae75d514bac79c52a56b76e867e778fe 100755 (executable)
@@ -19,10 +19,20 @@ for project in ${LIST}; do
        if [ -n "${CHECK_CHANGES}" ]
        then
                echo "$0: Committing '${project}' ..."
        if [ -n "${CHECK_CHANGES}" ]
        then
                echo "$0: Committing '${project}' ..."
-               if [ -n "$1" ]
+               if [ "$1" = "updated jar(s)" ]
                then
                then
+                       # Special commit ... (known-binaries)
+                       git commit --signoff -S lib/*.jar -m "$1"
+               elif [ -n "$1" -a -n "$2" ]
+               then
+                       # Regular commit with given message
+                       git commit $2 --signoff -S -m "$1" || exit 255
+               elif [ -n "$1" ]
+               then
+                       # Regular commit with given message
                        git commit -a --signoff -S -m "$1" || exit 255
                else
                        git commit -a --signoff -S -m "$1" || exit 255
                else
+                       # Regular commit, will open $EDITOR for commit message
                        git commit -a --signoff -S || exit 255
                fi
        else
                        git commit -a --signoff -S || exit 255
                fi
        else