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