diff options
Diffstat (limited to 'script/update')
-rwxr-xr-x | script/update/project/repo | 7 | ||||
-rwxr-xr-x | script/update/project/trees | 10 |
2 files changed, 5 insertions, 12 deletions
diff --git a/script/update/project/repo b/script/update/project/repo index d6eb3130..7e65ef29 100755 --- a/script/update/project/repo +++ b/script/update/project/repo @@ -79,11 +79,8 @@ clone_project() git clone ${url} "${tmp_dir}" || git clone ${bkup_url} "${tmp_dir}" || \ fail "clone_project: could not download ${name}" - ( - cd "${tmp_dir}" || fail "clone_project: tmpdir not created" - git reset --hard ${revision} || \ - fail "clone_project: Cannot reset revision" - ) + git_reset_rev "${tmp_dir}" "${revision}" "fail" || \ + fail "clone_project ${location}/: cannot reset <- ${revision}" git_am_patches "${tmp_dir}" "${PWD}/config/${name}/patches" "fail" || \ fail "clone_project ${location}/: cannot apply patches" diff --git a/script/update/project/trees b/script/update/project/trees index 27418f19..af8e4ed0 100755 --- a/script/update/project/trees +++ b/script/update/project/trees @@ -143,13 +143,9 @@ prepare_new_tree() cp -R "${project}/${project}" "${project}/${tree}" || \ err "${project}/${tree}: cannot copy source tree" - ( - cd "${project}/${tree}" || err "cannot cd to ${project}/${tree}" - git reset --hard ${rev} || \ - err "cannot reset ${project} revision for tree, ${tree}" - git submodule update --init --checkout || \ - err "cannot update ${project} submodules for tree, ${tree}" - ) + git_reset_rev "${project}/${tree}" "${rev}" "err" || \ + err "prepare_new_trees ${project}/${tree}: cannot reset <- ${rev}" + git_am_patches "${PWD}/${project}/${tree}" \ "${PWD}/${cfgsdir}/${tree}/patches" "err" || \ err "prepare_new_trees ${project}/${tree}: cannot apply patches" |