diff --git a/private_dot_local/bin/executable_clone-all-gitea-repos.sh b/private_dot_local/bin/executable_clone-all-gitea-repos.sh index f1dd965..eab33bc 100644 --- a/private_dot_local/bin/executable_clone-all-gitea-repos.sh +++ b/private_dot_local/bin/executable_clone-all-gitea-repos.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -set -x GITEA_HOST=${GITEA_HOST:-$1} if [ -z "$GITEA_HOST" ] || [ -z "$GITEA_ACCESS_TOKEN" ] ; then @@ -26,11 +25,11 @@ for i in $(curl -s --header "Authorization: token $GITEA_ACCESS_TOKEN" "${GITEA_ fi fi else - if [ -d "${fields[1]}" ] ; then - echo "Repo ${fields[1]} already exists, skipping." + if [ -d "${fields[0]}" ] ; then + echo "Repo ${fields[0]} already exists, skipping." else - echo "Cloning ${fields[1]} from ${fields[2]}" - git clone -q "${fields[2]}" + echo "Cloning ${fields[0]} from ${fields[1]}" + git clone -q "${fields[1]}" fi fi done