From 7d8d97597c425df922238104cda1ff489ff10e8a Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Tue, 9 Mar 2021 15:56:32 +0100 Subject: [PATCH] catch git clone error --- scripts/install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index c31cbb21..763a8d49 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -109,10 +109,13 @@ esac case $distro in Arch|Debian) echo "Emacs configuration" - - mkdir -p ~/.config/emacs + + folder="${HOME}/.config/emacs" + mkdir -p $folder echo "git clone" - git clone http://gogs.weseng.de/daniel/emacs.git ~/.config/emacs + if ! git clone http://gogs.weseng.de/daniel/emacs.git "${folder}" 2>/dev/null && test -d "${folder}" ; then + echo "clone failed because the folder ${folder} exists" + fi cp -r ~/.config/emacs/scripts/texmf ~/ ;;