mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 00:13:36 +01:00
Improve build-repo.ps1
This commit is contained in:
parent
a829a7c92d
commit
edb2bc56e6
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/pwsh
|
#!/usr/bin/pwsh
|
||||||
<#
|
<#
|
||||||
.SYNTAX build-repo.ps1 [<repo-dir>]
|
.SYNTAX build-repo.ps1 [<repo-dir>]
|
||||||
.DESCRIPTION builds the current/given Git repository
|
.DESCRIPTION builds a Git repository (supporting cmake,configure,autogen,Imakefile,Makefile)
|
||||||
.LINK https://github.com/fleschutz/PowerShell
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
.NOTES Author: Markus Fleschutz / License: CC0
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
#>
|
#>
|
||||||
@ -43,6 +43,16 @@ try {
|
|||||||
& 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/Imakefile") {
|
||||||
|
"Building $RepoDir using Imakefile..."
|
||||||
|
set-location "$RepoDir/"
|
||||||
|
|
||||||
|
& xmkmf
|
||||||
|
if ($lastExitCode -ne "0") { throw "Executing 'xmkmf' has failed" }
|
||||||
|
|
||||||
|
& make -j4
|
||||||
|
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/"
|
set-location "$RepoDir/"
|
||||||
@ -50,12 +60,12 @@ try {
|
|||||||
& 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") {
|
} elseif (test-path "$RepoDir/attower/src/build/DevBuild/build.bat") {
|
||||||
"Building $RepoDir using build-all-release.bat..."
|
"Building $RepoDir using build.bat..."
|
||||||
set-location "$RepoDir/attower/src/build/DevBuild/"
|
set-location "$RepoDir/attower/src/build/DevBuild/"
|
||||||
|
|
||||||
& ./build-all-release.bat
|
& ./build.bat build-all-release
|
||||||
if ($lastExitCode -ne "0") { throw "Script 'build-all-release.bat' returned error(s)" }
|
if ($lastExitCode -ne "0") { throw "Script 'build.bat' returned error(s)" }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
write-warning "Sorry, no clue how to build $RepoDir"
|
write-warning "Sorry, no clue how to build $RepoDir"
|
||||||
|
Loading…
Reference in New Issue
Block a user