Fixed check

This commit is contained in:
Thomas Forgione 2018-10-08 13:32:39 +02:00
parent 90295c4bef
commit 0ab00d3c36
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 1 additions and 2 deletions

View File

@ -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