mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 17:38:19 +02:00
Merge branch 'master' of github.com:fleschutz/PowerShell
This commit is contained in:
commit
e82c36b07a
@ -9,6 +9,7 @@ Math, CSS, main, no, "git@github.com:chikitpao/CSS.git"
|
|||||||
Tool, elasticsearch, main, no, "git@github.com:elastic/elasticsearch.git"
|
Tool, elasticsearch, main, no, "git@github.com:elastic/elasticsearch.git"
|
||||||
Tool, go-ipfs, master, no, "git@github.com:ipfs/go-ipfs.git"
|
Tool, go-ipfs, master, no, "git@github.com:ipfs/go-ipfs.git"
|
||||||
Tool, grafana, main, no, "git@github.com:grafana/grafana.git"
|
Tool, grafana, main, no, "git@github.com:grafana/grafana.git"
|
||||||
|
Tool, jhead, master, no, "git@github.com:Matthias-Wandel/jhead"
|
||||||
Tool, leon, master, no, "git@github.com:leon-ai/leon.git"
|
Tool, leon, master, no, "git@github.com:leon-ai/leon.git"
|
||||||
Dev, llvm, master, no, "git@github.com:llvm/llvm-project.git"
|
Dev, llvm, master, no, "git@github.com:llvm/llvm-project.git"
|
||||||
Math, LSS, master, no, "git@github.com:fleschutz/LSS.git"
|
Math, LSS, master, no, "git@github.com:fleschutz/LSS.git"
|
||||||
|
|
@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
param([string]$RepoDir = "$PWD")
|
param([string]$RepoDir = "$PWD")
|
||||||
|
|
||||||
function MakeDir { param($Path)
|
function BuildInDir { param($Path)
|
||||||
$DirName = (Get-Item "$Path").Name
|
$DirName = (Get-Item "$Path").Name
|
||||||
if (Test-Path "$Path/CMakeLists.txt" -pathType leaf) {
|
if (Test-Path "$Path/CMakeLists.txt" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using CMakeLists.txt into subfolder _My_Build/..."
|
"⏳ Building repo 📂$DirName using CMakeLists.txt into subfolder _My_Build ..."
|
||||||
if (-not(test-path "$Path/_My_Build/" -pathType container)) {
|
if (-not(Test-Path "$Path/_My_Build/" -pathType container)) {
|
||||||
& mkdir "$Path/_My_Build/"
|
& mkdir "$Path/_My_Build/"
|
||||||
}
|
}
|
||||||
Set-Location "$Path/_My_Build/"
|
Set-Location "$Path/_My_Build/"
|
||||||
@ -34,7 +34,7 @@ function MakeDir { param($Path)
|
|||||||
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/configure" -pathType leaf) {
|
} elseif (Test-Path "$Path/configure" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using 'configure'..."
|
"⏳ Building repo 📂$DirName using 'configure'..."
|
||||||
Set-Location "$Path/"
|
Set-Location "$Path/"
|
||||||
|
|
||||||
& ./configure
|
& ./configure
|
||||||
@ -47,7 +47,7 @@ function MakeDir { param($Path)
|
|||||||
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/autogen.sh" -pathType leaf) {
|
} elseif (Test-Path "$Path/autogen.sh" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using 'autogen.sh'..."
|
"⏳ Building repo 📂$DirName using 'autogen.sh'..."
|
||||||
Set-Location "$Path/"
|
Set-Location "$Path/"
|
||||||
|
|
||||||
& ./autogen.sh
|
& ./autogen.sh
|
||||||
@ -57,7 +57,7 @@ function MakeDir { param($Path)
|
|||||||
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/build.gradle" -pathType leaf) {
|
} elseif (Test-Path "$Path/build.gradle" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using build.gradle..."
|
"⏳ Building repo 📂$DirName using build.gradle..."
|
||||||
Set-Location "$Path"
|
Set-Location "$Path"
|
||||||
|
|
||||||
& gradle build
|
& gradle build
|
||||||
@ -67,7 +67,7 @@ function MakeDir { param($Path)
|
|||||||
if ($lastExitCode -ne "0") { throw "'gradle test' has failed" }
|
if ($lastExitCode -ne "0") { throw "'gradle test' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/Imakefile" -pathType leaf) {
|
} elseif (Test-Path "$Path/Imakefile" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using Imakefile..."
|
"⏳ Building repo 📂$DirName using Imakefile..."
|
||||||
Set-Location "$RepoDir/"
|
Set-Location "$RepoDir/"
|
||||||
|
|
||||||
& xmkmf
|
& xmkmf
|
||||||
@ -77,14 +77,21 @@ function MakeDir { param($Path)
|
|||||||
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/Makefile" -pathType leaf) {
|
} elseif (Test-Path "$Path/Makefile" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using Makefile..."
|
"⏳ Building repo 📂$DirName using Makefile..."
|
||||||
|
Set-Location "$Path"
|
||||||
|
|
||||||
|
& make -j4
|
||||||
|
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
||||||
|
|
||||||
|
} elseif (Test-Path "$Path/makefile" -pathType leaf) {
|
||||||
|
"⏳ Building repo 📂$DirName using makefile..."
|
||||||
Set-Location "$Path"
|
Set-Location "$Path"
|
||||||
|
|
||||||
& make -j4
|
& make -j4
|
||||||
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/compile.sh" -pathType leaf) {
|
} elseif (Test-Path "$Path/compile.sh" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using 'compile.sh'..."
|
"⏳ Building repo 📂$DirName using 'compile.sh'..."
|
||||||
Set-Location "$Path/"
|
Set-Location "$Path/"
|
||||||
|
|
||||||
& ./compile.sh
|
& ./compile.sh
|
||||||
@ -94,15 +101,15 @@ function MakeDir { param($Path)
|
|||||||
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/attower/src/build/DevBuild/build.bat" -pathType leaf) {
|
} elseif (Test-Path "$Path/attower/src/build/DevBuild/build.bat" -pathType leaf) {
|
||||||
"🔨 Building 📂$DirName using build.bat ..."
|
"⏳ Building repo 📂$DirName using build.bat ..."
|
||||||
Set-Location "$Path/attower/src/build/DevBuild/"
|
Set-Location "$Path/attower/src/build/DevBuild/"
|
||||||
|
|
||||||
& ./build.bat build-all-release
|
& ./build.bat build-all-release
|
||||||
if ($lastExitCode -ne "0") { throw "Script 'build.bat' exited with error code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "Script 'build.bat' exited with error code $lastExitCode" }
|
||||||
|
|
||||||
} elseif (Test-Path "$Path/$DirName" -pathType container) {
|
} elseif (Test-Path "$Path/$DirName" -pathType container) {
|
||||||
"🔨 No make rule found, trying subfolder 📂$($DirName)..."
|
"⏳ No make rule found, trying subfolder 📂$($DirName)..."
|
||||||
MakeDir "$Path/$DirName"
|
BuildInDir "$Path/$DirName"
|
||||||
} else {
|
} else {
|
||||||
Write-Warning "Sorry, no make rule applies to: 📂$DirName"
|
Write-Warning "Sorry, no make rule applies to: 📂$DirName"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
@ -116,11 +123,11 @@ try {
|
|||||||
$RepoDirName = (Get-Item "$RepoDir").Name
|
$RepoDirName = (Get-Item "$RepoDir").Name
|
||||||
|
|
||||||
$PreviousPath = Get-Location
|
$PreviousPath = Get-Location
|
||||||
MakeDir "$RepoDir"
|
BuildInDir "$RepoDir"
|
||||||
Set-Location "$PreviousPath"
|
Set-Location "$PreviousPath"
|
||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ built 📂$RepoDirName repository in $Elapsed sec"
|
"✔️ built repo 📂$RepoDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -22,10 +22,10 @@ try {
|
|||||||
& git --version
|
& git --version
|
||||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||||
|
|
||||||
Write-Host "⏳ (2) Loading Data/popular-git-repos.csv... " -noNewline
|
Write-Host "⏳ (2) Loading Data/popular-git-repos.csv... " -noNewline
|
||||||
$Table = Import-CSV "$PSScriptRoot/../Data/popular-git-repos.csv"
|
$Table = Import-CSV "$PSScriptRoot/../Data/popular-git-repos.csv"
|
||||||
$NumEntries = $Table.count
|
$NumEntries = $Table.count
|
||||||
Write-Host "$NumEntries Git repositories"
|
Write-Host "$NumEntries Git repos listed"
|
||||||
|
|
||||||
$TargetDirName = (Get-Item "$TargetDir").Name
|
$TargetDirName = (Get-Item "$TargetDir").Name
|
||||||
Write-Host "⏳ (3) Checking target folder... 📂$TargetDirName"
|
Write-Host "⏳ (3) Checking target folder... 📂$TargetDirName"
|
||||||
|
Loading…
Reference in New Issue
Block a user