about summary refs log tree commit diff
path: root/xlocate
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-06-02 15:55:15 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-06-02 15:55:15 +0200
commitd07f8ec8e2432a35860af5b7ff2894bdf3742d28 (patch)
treedaaa94cd320ff577998414240e2bf9f3fabbd098 /xlocate
parent742deda2875200a471f96822c2d0833fb4d5f752 (diff)
downloadxtools-d07f8ec8e2432a35860af5b7ff2894bdf3742d28.tar.gz
xtools-d07f8ec8e2432a35860af5b7ff2894bdf3742d28.tar.xz
xtools-d07f8ec8e2432a35860af5b7ff2894bdf3742d28.zip
xlocate: xsyncgit: also create basedir
Diffstat (limited to 'xlocate')
-rwxr-xr-xxlocate1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlocate b/xlocate
index cbfbfe4..995bd58 100755
--- a/xlocate
+++ b/xlocate
@@ -50,6 +50,7 @@ xsyncgit() {
 	if [ -d "$XLOCATE_GIT" ]; then
 		git -C "$XLOCATE_GIT" fetch -u -f "$XLOCATE_REPO" master:master
 	else
+		[ -n "${XLOCATE_GIT%/*}" ] && mkdir -p "${XLOCATE_GIT%/*}"
 		git clone --bare "$XLOCATE_REPO" "$XLOCATE_GIT"
 	fi
 }