Add unicode characters

This commit is contained in:
Markus Fleschutz 2021-04-16 18:58:19 +02:00
parent 46f7fd7b9c
commit 357ae2cea9
4 changed files with 26 additions and 16 deletions

View File

@ -1,7 +1,20 @@
### Silently installs latest google chrome ###
$Path = $env:TEMP;
$Installer = "chrome_installer.exe"
Invoke-WebRequest "http://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path\$Installer
Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait
Remove-Item $Path\$Installer
exit 0
#!/usr/bin/pwsh
<#
.SYNTAX install-google-chrome.ps1
.DESCRIPTION silently installs latest Google Chrome
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
$Path = $env:TEMP;
$Installer = "chrome_installer.exe"
Invoke-WebRequest "http://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path\$Installer
Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait
Remove-Item $Path\$Installer
write-host -foregroundColor green "✔️ installed Google Chrome"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX pull-repo.ps1 [<repo-dir>]
.DESCRIPTION pulls updates for the current/given Git repository (including submodules)
@ -9,7 +9,7 @@
param($RepoDir = "$PWD")
try {
write-output "Pulling updates for Git repository $RepoDir ..."
"Pulling updates for Git repository $RepoDir ..."
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
set-location "$RepoDir"
@ -20,7 +20,7 @@ try {
& git status
if ($lastExitCode -ne "0") { throw "'git status' failed" }
write-host -foregroundColor green "OK - pulled updates for Git repository $RepoDir"
write-host -foregroundColor green "✔️ updates pulled for Git repository $RepoDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -30,7 +30,7 @@ try {
$Count++
}
write-host -foregroundColor green "OK - pulled updates for $Count Git repositories under $ParentDir in $($StopWatch.Elapsed.Seconds) second(s)"
write-host -foregroundColor green "✔️ pulled updates for $Count Git repositories under $ParentDir in $($StopWatch.Elapsed.Seconds) second(s)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX switch-branch.ps1 [<branch-name>] [<repo-dir>]
.DESCRIPTION switches the branch in the current/given Git repository (including submodules)
@ -7,10 +7,7 @@
#>
param($BranchName = "", $RepoDir = "$PWD")
if ($BranchName -eq "") {
$BranchName = read-host "Enter name of branch to switch to"
}
if ($BranchName -eq "") { $BranchName = read-host "Enter name of branch to switch to" }
try {
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }