From 6a3b49ae66eea02569e80c1c0fa2043c159038e4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 17 Sep 2018 22:48:31 +0200 Subject: bin/build-packages,bin/check-mirrors,bin/get-package-updates: "git fetch origin master:master" only works for bare repositories - use "git remote update" for non-bare ones --- bin/build-packages | 6 +++++- bin/check-mirrors | 6 +++++- bin/get-package-updates | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/build-packages b/bin/build-packages index 62cfae7..a3f253d 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -283,7 +283,11 @@ while [ "${count}" -ne 0 ] && \ for repo_name in ${repo_names}; do eval repo_path='"${repo_paths__'"${repo_name}"'}"' - git -C "${repo_path}" fetch origin master:master || \ + if [ -d "${repo_path}/.git" ]; then + git -C "${repo_path}" remote update + else + git -C "${repo_path}" fetch origin master:master + fi || \ true done diff --git a/bin/check-mirrors b/bin/check-mirrors index b629880..696ded6 100755 --- a/bin/check-mirrors +++ b/bin/check-mirrors @@ -5,7 +5,11 @@ if [ $# -eq 0 ]; then - git -C "${releng_directory}" fetch origin master:master || \ + if [ -d "${releng_directory}/.git" ]; then + git -C "${releng_directory}" remote update + else + git -C "${releng_directory}" fetch origin master:master + fi || \ true country_codes=$( diff --git a/bin/get-package-updates b/bin/get-package-updates index d9c71ab..5a7af82 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -200,7 +200,11 @@ something_new=false for repo in ${repo_names}; do eval repo_path='"${repo_paths__'"${repo}"'}"' # Update git repositories (official packages, community packages and the repository of package customizations). - git -C "${repo_path}" fetch origin master:master || \ + if [ -d "${repo_path}/.git" ]; then + git -C "${repo_path}" remote update + else + git -C "${repo_path}" fetch origin master:master + fi || \ true # read previous git revision numbers from database. # shellcheck disable=SC2016 -- cgit v1.2.3-70-g09d2