X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=commit-jprojects.sh;h=deff10f8ae75d514bac79c52a56b76e867e778fe;hb=699987bc98417e7853e6cd1bc70bf307af7e8617;hp=68fdbee58b69c530ffeed532a85ecabbf9a64431;hpb=91991e3f923f2f99f4dff2fdd9f53556ba2c4290;p=jprojects-scripts.git diff --git a/commit-jprojects.sh b/commit-jprojects.sh index 68fdbee..deff10f 100755 --- a/commit-jprojects.sh +++ b/commit-jprojects.sh @@ -3,16 +3,36 @@ . ./.jprojects.sh || exit 255 for project in ${LIST}; do + if [ "${project}" = "jprojects-scripts" ] + then + echo "$0: Skipping jprojects-scripts ..." + continue + elif [ ! -d "${JPROJECTS_HOME}/${project}" ] + then + echo "$0: Project '${project}' does not exist." + continue + fi + cd "${JPROJECTS_HOME}/${project}" || exit 255 - CHECK_CHANGES=`git commit -a --dry-run | grep "Changes to be committed:"` + CHECK_CHANGES=$(git commit -a --dry-run | grep "Changes to be committed:") if [ -n "${CHECK_CHANGES}" ] then echo "$0: Committing '${project}' ..." - if [ -n "$1" ] + if [ "$1" = "updated jar(s)" ] + 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 + # Regular commit, will open $EDITOR for commit message git commit -a --signoff -S || exit 255 fi else