From 0ab00d3c3699a3273912689ad56c5f1a19d62dd0 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Mon, 8 Oct 2018 13:32:39 +0200 Subject: [PATCH] Fixed check --- zsh/gclone.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zsh/gclone.zsh b/zsh/gclone.zsh index ac04c49..fd2ce3b 100644 --- a/zsh/gclone.zsh +++ b/zsh/gclone.zsh @@ -21,7 +21,7 @@ if [ -d "$GCLONE_PATH" ]; then # Final path to the repo repo_path=$GCLONE_PATH/$server/$user - if [ -d $repo_path ]; then + if [ -d $repo_path/$repo ]; then echo "Repository already exists" return 1 fi @@ -42,7 +42,6 @@ if [ -d "$GCLONE_PATH" ]; then else # If there is a cache, just append the current dir at the end # and sort it back - echo $repo_path echo $repo_path >> $GCLONE_PATH/.cdgcache echo $repo_path/$repo >> $GCLONE_PATH/.cdgcache cat $GCLONE_PATH/.cdgcache | sort | uniq > $GCLONE_PATH/.cdgcache.tmp