From 3a08a627aad1eb6c45ec3220da0e76b357656d48 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 1 Apr 2023 19:38:27 +0200 Subject: [PATCH] Add install-basic-snaps.ps1 --- Scripts/install-basic-snaps.ps1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Scripts/install-basic-snaps.ps1 diff --git a/Scripts/install-basic-snaps.ps1 b/Scripts/install-basic-snaps.ps1 new file mode 100644 index 00000000..ac99182c --- /dev/null +++ b/Scripts/install-basic-snaps.ps1 @@ -0,0 +1,26 @@ +<# +.SYNOPSIS + Installs basic snaps +.DESCRIPTION + This PowerShell script installs basic Windows apps such as browser, e-mail client, etc. +.EXAMPLE + PS> ./install-basic-snaps +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + $StopWatch = [system.diagnostics.stopwatch]::startNew() + + "⏳ (1/1) Installing ant..." + snap install ant + + [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds + "✔️ installed basic snaps in $Elapsed sec" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +}