mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 17:14:28 +01:00
Improve both scripts
This commit is contained in:
parent
a2a0c914fe
commit
6e5d0d05cb
@ -9,10 +9,12 @@
|
|||||||
param($RepoDir = "$PWD")
|
param($RepoDir = "$PWD")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (test-path "$Repodir/CMakeLists.txt") {
|
if (test-path "$RepoDir/CMakeLists.txt") {
|
||||||
"Building $RepoDir using CMakeLists.txt..."
|
"Building $RepoDir using CMakeLists.txt..."
|
||||||
& mkdir CMakeBuild
|
if (-not(test-path "$RepoDir/CMakeBuild") {
|
||||||
set-location CMakeBuild
|
& mkdir "$RepoDir/CMakeBuild/"
|
||||||
|
}
|
||||||
|
set-location "$RepoDir/CMakeBuild/"
|
||||||
|
|
||||||
& cmake ..
|
& cmake ..
|
||||||
if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" }
|
||||||
@ -21,9 +23,17 @@ try {
|
|||||||
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
|
||||||
} elseif (test-path "$RepoDir/Makefile") {
|
} elseif (test-path "$RepoDir/Makefile") {
|
||||||
"Building $RepoDir using Makefile..."
|
"Building $RepoDir using Makefile..."
|
||||||
|
set-location "$RepoDir/"
|
||||||
|
|
||||||
& 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 "$RepoDir/attower/src/build/DevBuild/build-all-release.bat") {
|
||||||
|
"Building $RepoDir using build-all-release.bat..."
|
||||||
|
set-location "$RepoDir/attower/src/build/DevBuild/"
|
||||||
|
|
||||||
|
& build-all-release.bat
|
||||||
|
if ($lastExitCode -ne "0") { throw "Script 'build-all-release.bat' returned error(s)" }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
write-warning "Sorry, no clue how to build $RepoDir"
|
write-warning "Sorry, no clue how to build $RepoDir"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -17,8 +17,8 @@ try {
|
|||||||
|
|
||||||
[int]$Count = 0
|
[int]$Count = 0
|
||||||
get-childItem $ParentDir -attributes Directory | foreach-object {
|
get-childItem $ParentDir -attributes Directory | foreach-object {
|
||||||
& "$PSScriptRoot/build-repo.ps1" "$ParentDir/$($_.FullName)"
|
& "$PSScriptRoot/build-repo.ps1" "$($_.FullName)"
|
||||||
if ($lastExitCode -ne "0") { throw "'git fetch --all --recurse-submodules' failed" }
|
if ($lastExitCode -ne "0") { throw "Script 'build-repo.ps1' failed" }
|
||||||
|
|
||||||
$Count++
|
$Count++
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user