mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-23 23:29:02 +01:00
Improve output of both scripts
This commit is contained in:
parent
8733e87c4c
commit
1995c56a2a
@ -18,12 +18,12 @@ try {
|
||||
$Folders = (get-childItem "$ParentDir" -attributes Directory)
|
||||
$FolderCount = $Folders.Count
|
||||
$ParentDirName = (get-item "$ParentDir").Name
|
||||
"Found $FolderCount subfolders in 📂$ParentDirName..."
|
||||
"Found $FolderCount subfolders in 📂$ParentDirName, cleaning from untracked files..."
|
||||
|
||||
[int]$Step = 1
|
||||
foreach ($Folder in $Folders) {
|
||||
$FolderName = (get-item "$Folder").Name
|
||||
"🧹 Cleaning 📂$FolderName from untracked files (#$Step/$FolderCount)..."
|
||||
"🧹 Cleaning 📂$FolderName ($Step/$FolderCount)..."
|
||||
|
||||
& git -C "$Folder" clean -xfd -f # force + recurse into dirs + don't use the standard ignore rules
|
||||
if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' failed" }
|
||||
|
@ -23,7 +23,7 @@ try {
|
||||
[int]$Step = 1
|
||||
foreach ($Folder in $Folders) {
|
||||
$FolderName = (get-item "$Folder").Name
|
||||
"🢃 Pulling 📂$FolderName (#$Step/$FolderCount)..."
|
||||
"🢃 Pulling 📂$FolderName ($Step/$FolderCount)..."
|
||||
|
||||
& git -C "$Folder" pull --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" }
|
||||
|
Loading…
Reference in New Issue
Block a user