mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 23:56:52 +01:00
Update clone-repos.ps1
This commit is contained in:
parent
9fccef1890
commit
ccc7da102b
@ -1,12 +1,17 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Clones popular repos
|
Clones Git repos
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script clones popular Git repositories into a target directory.
|
This PowerShell script clones popular Git repositories into a target directory.
|
||||||
.PARAMETER targetDir
|
.PARAMETER targetDir
|
||||||
Specifies the file path to the target directory (current working directory by default)
|
Specifies the file path to the target directory (current working directory by default)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./clone-repos C:\Repos
|
PS> ./clone-repos C:\Repos
|
||||||
|
⏳ (1) Searching for Git executable... git version 2.41.0.windows.3
|
||||||
|
⏳ (2) Loading Data/popular-git-repos.csv... 28 repos
|
||||||
|
⏳ (3) Checking target folder... 📂repos
|
||||||
|
⏳ (4/32) Cloning into 📂base256unicode (dev tool)...
|
||||||
|
...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -59,7 +64,7 @@ try {
|
|||||||
$Cloned++
|
$Cloned++
|
||||||
}
|
}
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ cloned $Cloned of $NumEntries Git repos into folder 📂$TargetDirName in $Elapsed sec"
|
"✔️ Cloning $Cloned of $NumEntries Git repos into folder 📂$TargetDirName took $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user