From 89ec48611a84a6b1bbe6b4176ccc59b7dee92f46 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 17 Oct 2016 16:27:14 +0200 Subject: xlocate: cleanup --- xlocate | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xlocate') diff --git a/xlocate b/xlocate index 6960edd..894ab6e 100755 --- a/xlocate +++ b/xlocate @@ -47,13 +47,11 @@ xupdategit() { } xsyncgit() { - if [ -d "$XLOCATE_GIT" ]; then - git -C "$XLOCATE_GIT" fetch -u -f "$XLOCATE_REPO" master:master - else + if ! [ -d "$XLOCATE_GIT" ]; then [ -n "${XLOCATE_GIT%/*}" ] && mkdir -p "${XLOCATE_GIT%/*}" git clone --bare "$XLOCATE_REPO" "$XLOCATE_GIT" - git -C "$XLOCATE_GIT" fetch -u -f "$XLOCATE_REPO" master:master fi + git -C "$XLOCATE_GIT" fetch -u -f "$XLOCATE_REPO" master:master } if [ "$1" = -u ]; then -- cgit 1.4.1