about summary refs log tree commit diff
path: root/xlocate
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-10-17 16:27:14 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-10-17 16:27:14 +0200
commit89ec48611a84a6b1bbe6b4176ccc59b7dee92f46 (patch)
treefd87d07503882232cb3e7a5b150507f277125b99 /xlocate
parent2b59a122223466eab3a847a5eae7f49a892de797 (diff)
downloadxtools-89ec48611a84a6b1bbe6b4176ccc59b7dee92f46.tar.gz
xtools-89ec48611a84a6b1bbe6b4176ccc59b7dee92f46.tar.xz
xtools-89ec48611a84a6b1bbe6b4176ccc59b7dee92f46.zip
xlocate: cleanup v0.44
Diffstat (limited to 'xlocate')
-rwxr-xr-xxlocate6
1 files changed, 2 insertions, 4 deletions
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