mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-24 15:49:02 +01:00
Improve the output
This commit is contained in:
parent
0c50ee42d5
commit
f170bc831c
@ -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])"
|
||||
|
@ -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 ..."
|
||||
|
Loading…
Reference in New Issue
Block a user