mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-08 20:54:38 +02:00
Add check-earth.ps1
This commit is contained in:
22
Scripts/check-earth.ps1
Executable file
22
Scripts/check-earth.ps1
Executable file
@ -0,0 +1,22 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Checks the earth (fun)
|
||||
.DESCRIPTION
|
||||
This script checks the earth and replies by text-to-speech (TTS).
|
||||
.EXAMPLE
|
||||
PS> ./check-earth
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
$Reply = "Earth still spins with 1.040mph"
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
Reference in New Issue
Block a user