From 7f61920bdea7861b5a57e41674bd53612288c1b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 10 Jun 2017 21:46:34 +0200 Subject: [PATCH] Some fixes: - let's use more $() instead of `` - only fetch, not pull (which includes a merge) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- cherry-jprojects.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cherry-jprojects.sh b/cherry-jprojects.sh index 38b9890..627d59d 100755 --- a/cherry-jprojects.sh +++ b/cherry-jprojects.sh @@ -19,13 +19,13 @@ for project in ${LIST}; do continue fi - COMMIT_IDS=`cat "${COMMITS_FILE}"` + COMMIT_IDS=$(cat "${COMMITS_FILE}") if [ -n "${COMMIT_IDS}" ] then cd "${JPROJECTS_HOME}/${project}" - echo "$0: Pulling all for project '${project}' ..." - git pull --all + echo "$0: Fetching all for project '${project}' ..." + git fetch --all else echo "$0: Nothing to cherry-pick for '${project}'." rm "${COMMITS_FILE}" @@ -35,7 +35,7 @@ for project in ${LIST}; do echo "$0: Cherry-picking on project '${project}' ..." for commit in ${COMMIT_IDS}; do echo "$0: Working on commit '${commit}' ..." - FOUND_ID=`git rev-list "${commit}" --max-count=1 2>&1` + FOUND_ID=$(git rev-list "${commit}" --max-count=1 2>&1) STATUS="$?" if [ "${STATUS}" != "0" ] @@ -48,7 +48,7 @@ for project in ${LIST}; do git cherry-pick -S "${commit}" || exit 255 echo "$0: Removing commit from list ..." - REMAINING_IDS=`cat ${COMMITS_FILE} | grep -v "${commit}"` + REMAINING_IDS=$(cat ${COMMITS_FILE} | grep -v "${commit}") echo "${REMAINING_IDS}" > ${COMMITS_FILE} done -- 2.39.5