]> git.mxchange.org Git - jprojects-scripts.git/blobdiff - cherry-jprojects.sh
Continued:
[jprojects-scripts.git] / cherry-jprojects.sh
index 627d59d5daa7135c18eadb73c29f6cd7ec19d530..1ecb7945ed71f8769a80eb73076579ea5b5a3cff 100755 (executable)
@@ -3,8 +3,6 @@
 . ./.jprojects.sh || exit 255
 
 for project in ${LIST}; do
 . ./.jprojects.sh || exit 255
 
 for project in ${LIST}; do
-       COMMITS_FILE="${JPROJECTS_HOME}/${project}/.gitcommits"
-
        if [ "${project}" = "jprojects-scripts" ]
        then
                echo "$0: Skipping jprojects-scripts ..."
        if [ "${project}" = "jprojects-scripts" ]
        then
                echo "$0: Skipping jprojects-scripts ..."
@@ -13,7 +11,11 @@ for project in ${LIST}; do
        then
                echo "$0: Project '${project}' does not exist."
                continue
        then
                echo "$0: Project '${project}' does not exist."
                continue
-       elif [ ! -f "${COMMITS_FILE}" ]
+       fi
+
+       COMMITS_FILE="${JPROJECTS_HOME}/${project}/.gitcommits"
+
+       if [ ! -f "${COMMITS_FILE}" ]
        then
                # No .gitcommits file, skip this silently
                continue
        then
                # No .gitcommits file, skip this silently
                continue
@@ -25,6 +27,7 @@ for project in ${LIST}; do
        then
                cd "${JPROJECTS_HOME}/${project}"
                echo "$0: Fetching all for project '${project}' ..."
        then
                cd "${JPROJECTS_HOME}/${project}"
                echo "$0: Fetching all for project '${project}' ..."
+               git prune
                git fetch --all
        else
                echo "$0: Nothing to cherry-pick for '${project}'."
                git fetch --all
        else
                echo "$0: Nothing to cherry-pick for '${project}'."