mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-22 21:58:42 +01:00
Rename to pull-repos.ps1
This commit is contained in:
parent
5603555d48
commit
60351adce2
@ -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
|
||||
|
|
@ -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
|
||||
------------------------
|
||||
|
@ -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" }
|
Loading…
Reference in New Issue
Block a user