1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00
nu_scripts/modules/clone-all/README.md
Auca Coyan 1ccc379f38
clone all script (#781)
Hi! I did a script to clone multiple repos of github in a single folder
I clone everything I intend to work when I reset my pc

Instructions incluided!
2024-03-10 07:11:37 -05:00

1.3 KiB

Clone all

Do you want to automate cloning a list repos into a folder? This script is for you!

Requirements:

How to use it

Load the script:

  • if you have cloned the repo before:
source ~/your/directory/to/nu_scripts/modules/clone-all/clone-all.nu

or if you have the file, and you want it to use in a nushell session:

use clone-all.nu *
# and it's ready to use in the current prompt!

Then, create a list of github routes to repositories ORGANIZATION_NAME/REPO like this:

let list_of_repos = [
    "nushell/nushell"
    "nushell/nu_scripts"
    "nushell/vscode-nushell-lang"
]

And then you need to pass that variable and a destination folder

clone all $list_of_repos $"($env.home)/other-repos/nu_repos"

Tips

I (@AucaCoyan) use it for cloning both org repos and my forks

let nushell_repos = [
    "nushell/nushell"
    "nushell/nu_scripts"
    "nushell/vscode-nushell-lang"
]

clone all $nushell_repos $"($env.home)/other-repos/nu"

let nushell_forks = [
    "AucaCoyan/nushell"
    "AucaCoyan/nu_scripts"
    "AucaCoyan/vscode-nushell-lang"
]

clone all $nushell_forks $"($env.home)/repos"

and do that with every gh org (work or open source!)