set -e

echo "Authenticating with Github token..."
gh auth login --with-token < ~/.tokens/github/dotfiles.txt

gh_users=(${GH_USERS:-se7entyse7en})
for gh_user in "${gh_users[@]}"
do
    echo "Cloning repositories for $gh_user..."
    mkdir -p "~/Projects/$gh_user" && cd "~/Projects/$gh_user"
    gh repo list "$gh_user" --source -L 1000 --json sshUrl --jq '.[] | .sshUrl' | xargs -L1 git clone || true
    echo "All repositories for $gh_user cloned."
done

set -e

echo "Authenticating with Github token..."
gh auth login --with-token < ~/.tokens/github/dotfiles.txt

gh_users=(${GH_USERS:-se7entyse7en})
base_path="/Users/se7entyse7en/Projects/"
for gh_user in "${gh_users[@]}"
do
    path="$base_path$gh_user"
    echo "Cloning repositories for $gh_user in $path..."
    mkdir -p "$path" && cd "$path"
    gh repo list "$gh_user" --source -L 1000 --json sshUrl --jq '.[] | .sshUrl' | xargs -L1 git clone || true
    echo "All repositories for $gh_user cloned."
done

Fix location of cloned repositories
Fix location of cloned repositories

Signed-off-by: Lou Marvin Caraig <5f33b97f6c357145640aa3022c2df12fd56c93cf@gmail.com>
