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."
14 elif [ ! -f "${JPROJECTS_HOME}/${project}/.gitcommits" ]
16 # No .gitcommits file, skip this silently
20 COMMIT_IDS=`cat "${JPROJECTS_HOME}/${project}/.gitcommits"`
21 COMMITS_FILE="${JPROJECTS_HOME}/${project}/.gitcommits"
23 echo "$0: Cherry-picking on project '${project}' ..."
24 for commit in ${COMMIT_IDS}; do
25 cd "${JPROJECTS_HOME}/${project}"
26 echo "$0: Working on commit '${commit}' ..."
27 FOUND_ID=`git rev-list "${commit}" --max-count=1 2>&1`
30 if [ "${STATUS}" != "0" ]
32 echo "$0: Found invalid commit id '${commit}' or status '${STATUS}'."
33 echo "$0: Maybe forgot git-remote add <project-name>-local <local-path> ?"
37 git cherry-pick -S "${commit}" || exit 255
39 echo "$0: Removing commit from list ..."
40 REMAINING_IDS=`cat ${COMMITS_FILE} | grep -v "${commit}"`
41 echo "${REMAINING_IDS}" > ${COMMITS_FILE}
44 rm -f "${COMMITS_FILE}"