Improve the output

This commit is contained in:
Markus Fleschutz 2021-04-21 12:22:41 +02:00
parent 0c50ee42d5
commit f170bc831c
2 changed files with 9 additions and 7 deletions

View File

@ -11,22 +11,24 @@ param($RepoDir = "$PWD")
try {
$StopWatch = [system.diagnostics.stopwatch]::startNew()
$RepoDir = resolve-path -path "$RepoDir" -relative
$RepoDir = resolve-path "$RepoDir"
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
if (test-path "$RepoDir/CMakeLists.txt") {
"⏳ Building 📂$RepoDir using CMakeLists.txt ..."
if (-not(test-path "$RepoDir/CMakeBuild")) {
& mkdir "$RepoDir/CMakeBuild/"
if (-not(test-path "$RepoDir/BuildFiles/" -pathType container)) {
& mkdir "$RepoDir/BuildFiles/"
}
set-location "$RepoDir/CMakeBuild/"
set-location "$RepoDir/BuildFiles/"
& cmake ..
if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" }
& make -j4
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
set-location ".."
} elseif (test-path "$RepoDir/configure") {
"⏳ Building 📂$RepoDir using 'configure' ..."
set-location "$RepoDir/"
@ -76,7 +78,7 @@ try {
exit 0
}
"✔️ built Git repository 📂$RepoDir in $($StopWatch.Elapsed.Seconds) second(s)"
"✔️ built Git repository 📂$RepoDir in $($StopWatch.Elapsed.Seconds) sec."
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -23,7 +23,7 @@ try {
$URL = $Row.URL
$DirName = $Row.Directory
if (test-path "$ParentDir/$DirName" -pathType container) {
"Skipping 📂$DirName - it exists already ..."
"Skipping 📂$DirName because it exists already ..."
continue
}
"⏳ Cloning $URL to 📂$DirName ..."