diff options
author | Mike Kaganski <mikekaganski@hotmail.com> | 2021-03-04 11:40:05 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-04 15:16:55 +0100 |
commit | 0e6e10cd3dd5a6bf06000750a74982a9824ec853 (patch) | |
tree | f38df931935d2a94f82ab705a9703c384a9b049d /g | |
parent | 5e75b7ca828954f9a23d7a3e8c3be3e0934210b3 (diff) |
Workaround a problem in Git for Windows' bash
... where running './g pull -r' resulted in
ln: failed to create symbolic link '.git/modules/dictionaries/hooks/*': No such file or directory
ln: failed to create symbolic link '.git/modules/translations/hooks/*': No such file or directory
Change-Id: Ie0bd2eaca44f8b1a2ad2de9083bbefc779e213e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111948
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'g')
-rwxr-xr-x | g | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -38,6 +38,9 @@ refresh_submodule_hooks() if [ -d "${repo?}"/.git ] ; then # use core's hook by default for hook_name in "${COREDIR?}/.git-hooks"/* ; do + if [ ! -e "${hook_name}" ] ; then + continue + fi hook="${repo?}/.git/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" @@ -46,6 +49,9 @@ refresh_submodule_hooks() done # override if need be by the submodules' own hooks for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do + if [ ! -e "${hook_name}" ] ; then + continue + fi hook="${repo?}/.git/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" @@ -54,6 +60,9 @@ refresh_submodule_hooks() done elif [ -d .git/modules/"${repo}"/hooks ] ; then for hook_name in "${COREDIR?}/.git-hooks"/* ; do + if [ ! -e "${hook_name}" ] ; then + continue + fi hook=".git/modules/${repo?}/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" @@ -62,6 +71,9 @@ refresh_submodule_hooks() done # override if need be by the submodules' own hooks for hook_name in "${COREDIR?}/${repo?}/.git-hooks"/* ; do + if [ ! -e "${hook_name}" ] ; then + continue + fi hook=".git/modules/${repo?}/hooks/${hook_name##*/}" if [ ! -e "${hook?}" ] || [ -L "${hook?}" ] ; then rm -f "${hook?}" |