mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 21:20:51 +01:00
Improved the scripts
This commit is contained in:
parent
92f759c1d4
commit
8001d120c6
@ -104,7 +104,7 @@ turn-volume-up.ps1, turns the audio volume up (+10% by default)
|
|||||||
turn-volume-down.ps1, turns the audio volume down (-10% by default)
|
turn-volume-down.ps1, turns the audio volume down (-10% by default)
|
||||||
txt2wav.ps1, converts text into a audio .WAV file
|
txt2wav.ps1, converts text into a audio .WAV file
|
||||||
unmute-audio.ps1, unmutes audio
|
unmute-audio.ps1, unmutes audio
|
||||||
update-repos.ps1, updates all Git repositories under the current directory
|
update-repos.ps1, updates all Git repositories under the current/given directory
|
||||||
visualize-dir-tree.ps1, visualizes the given/current directory tree
|
visualize-dir-tree.ps1, visualizes the given/current directory tree
|
||||||
voice-control.ps1, executes the PowerShell scripts by voice
|
voice-control.ps1, executes the PowerShell scripts by voice
|
||||||
weather.ps1, prints the current weather forecast
|
weather.ps1, prints the current weather forecast
|
||||||
|
|
@ -110,7 +110,7 @@ Table of Contents
|
|||||||
* [turn-volume-down.ps1](Scripts/turn-volume-down.ps1) - turns the audio volume down (-10% by default)
|
* [turn-volume-down.ps1](Scripts/turn-volume-down.ps1) - turns the audio volume down (-10% by default)
|
||||||
* [txt2wav.ps1](Scripts/txt2wav.ps1) - converts text into a audio .WAV file
|
* [txt2wav.ps1](Scripts/txt2wav.ps1) - converts text into a audio .WAV file
|
||||||
* [unmute-audio.ps1](Scripts/unmute-audio.ps1) - unmutes audio
|
* [unmute-audio.ps1](Scripts/unmute-audio.ps1) - unmutes audio
|
||||||
* [update-repos.ps1](Scripts/update-repos.ps1) - updates all Git repositories under the current directory
|
* [update-repos.ps1](Scripts/update-repos.ps1) - updates all Git repositories under the current/given directory
|
||||||
* [visualize-dir-tree.ps1](Scripts/visualize-dir-tree.ps1) - visualizes the given/current directory tree
|
* [visualize-dir-tree.ps1](Scripts/visualize-dir-tree.ps1) - visualizes the given/current directory tree
|
||||||
* [voice-control.ps1](Scripts/voice-control.ps1) - executes the PowerShell scripts by voice
|
* [voice-control.ps1](Scripts/voice-control.ps1) - executes the PowerShell scripts by voice
|
||||||
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
||||||
|
@ -8,6 +8,13 @@
|
|||||||
|
|
||||||
param($URL = "")
|
param($URL = "")
|
||||||
|
|
||||||
|
try {
|
||||||
|
& wget --version
|
||||||
|
} catch {
|
||||||
|
write-error "Can't execute 'wget' - make sure wget is installed and available"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($URL -eq "" ) {
|
if ($URL -eq "" ) {
|
||||||
$URL = read-host "Enter URL to download"
|
$URL = read-host "Enter URL to download"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/powershell
|
#!/bin/powershell
|
||||||
<#
|
<#
|
||||||
.SYNTAX ./update-repos.ps1 [<directory>]
|
.SYNTAX ./update-repos.ps1 [<directory>]
|
||||||
.DESCRIPTION updates all Git repositories under the current directory
|
.DESCRIPTION updates all Git repositories under the current/given directory
|
||||||
.LINK https://github.com/fleschutz/PowerShell
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
.NOTES Author: Markus Fleschutz / License: CC0
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
#>
|
#>
|
||||||
@ -19,10 +19,10 @@ try {
|
|||||||
if ($Directory -eq "") {
|
if ($Directory -eq "") {
|
||||||
$Directory = "$PWD"
|
$Directory = "$PWD"
|
||||||
}
|
}
|
||||||
$Items = get-childItem -path $Directory
|
$Files = get-childItem -path $Directory
|
||||||
foreach ($Item in $Items) {
|
foreach ($File in $Files) {
|
||||||
if ($Item.Mode -like "d*") {
|
if ($File.Mode -like "d*") {
|
||||||
$Filename = $Item.Name
|
$Filename = $File.Name
|
||||||
write-host ""
|
write-host ""
|
||||||
write-host -nonewline "Updating $Filename ..."
|
write-host -nonewline "Updating $Filename ..."
|
||||||
set-location $Filename
|
set-location $Filename
|
||||||
|
Loading…
Reference in New Issue
Block a user