Rename to pull-repos.ps1

This commit is contained in:
Markus Fleschutz 2021-03-19 17:43:28 +01:00
parent 5603555d48
commit 60351adce2
3 changed files with 10 additions and 6 deletions

View File

@ -94,6 +94,7 @@ play-mp3.ps1, plays the given sound file (MP3 file format)
play-super-mario.ps1, plays the Super Mario Intro
play-the-imperial-march.ps1, plays the Imperial March (Star Wars)
poweroff.ps1, halts the local computer (requires admin rights)
pull-repos.ps1, pulls updates for all Git repositories under the current/given directory (including submodules)
query-smart-data.ps1, queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given directory
new-email.ps1, starts the default email client to write a new email
reboot.ps1, reboots the local computer (requires admin rights)
@ -131,7 +132,6 @@ turn-volume-up.ps1, turns the audio volume up (+10% by default)
turn-volume-down.ps1, turns the audio volume down (-10% by default)
txt2wav.ps1, converts text into a audio .WAV file
unmute-audio.ps1, unmutes audio
update-repos.ps1, updates all Git repositories under the current/given directory (including submodules)
voice-control.ps1, executes the PowerShell scripts by voice
weather.ps1, prints the current weather forecast
weather-alert.ps1, checks the current weather for critical values

1 Script Description
94 play-super-mario.ps1 plays the Super Mario Intro
95 play-the-imperial-march.ps1 plays the Imperial March (Star Wars)
96 poweroff.ps1 halts the local computer (requires admin rights)
97 pull-repos.ps1 pulls updates for all Git repositories under the current/given directory (including submodules)
98 query-smart-data.ps1 queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given directory
99 new-email.ps1 starts the default email client to write a new email
100 reboot.ps1 reboots the local computer (requires admin rights)
132 turn-volume-down.ps1 turns the audio volume down (-10% by default)
133 txt2wav.ps1 converts text into a audio .WAV file
134 unmute-audio.ps1 unmutes audio
update-repos.ps1 updates all Git repositories under the current/given directory (including submodules)
135 voice-control.ps1 executes the PowerShell scripts by voice
136 weather.ps1 prints the current weather forecast
137 weather-alert.ps1 checks the current weather for critical values

View File

@ -110,8 +110,8 @@ Collection of PowerShell Scripts
* [list-branches.ps1](Scripts/list-branches.ps1) - lists all branches in the current/given Git repository
* [list-commits.ps1](Scripts/list-commits.ps1) - lists all commits in the current/given Git repository
* [list-tags.ps1](Scripts/list-tags.ps1) - lists all tags in the current/given Git repository
* [pull-repos.ps1](Scripts/pull-repos.ps1) - pulls updates for all Git repositories under the current/given directory (including submodules)
* [switch-branch.ps1](Scripts/switch-branch.ps1) - switches the branch in the current/given Git repository (including submodules)
* [update-repos.ps1](Scripts/update-repos.ps1) - updates all Git repositories under the current/given directory (including submodules)
🔎 Scripts for PowerShell
------------------------

View File

@ -1,7 +1,7 @@
#!/bin/powershell
<#
.SYNTAX ./update-repos.ps1 [<parent-dir>]
.DESCRIPTION updates all Git repositories under the current/given directory (including submodules)
.SYNTAX ./pull-repos.ps1 [<parent-dir>]
.DESCRIPTION pulls updates for all Git repositories under the current/given directory (including submodules)
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
@ -16,11 +16,15 @@ try {
}
try {
set-location $ParentDir
write-progress "Pulling updates for Git repositories under $ParentDir ..."
if (-not(test-path "$ParentDir" -pathType container)) { throw "Can't access directory: $ParentDir" }
set-location "$ParentDir"
get-childItem $ParentDir -attributes Directory | foreach-object {
set-location $_.FullName
write-host ""
write-host -nonewline "Updating $($_.FullName)..."
write-host -nonewline "Pulling $($_.FullName)..."
& git pull --recurse-submodules
if ($lastExitCode -ne "0") { throw "'git pull --recurse-submodules' failed" }