mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
chore(pwsh): fmt
This commit is contained in:
@@ -8,4 +8,4 @@ Remove-Item -Path "$Env:USERPROFILE\.local\bin\$MY_CMD.ps1" -Recurse -ErrorActio
|
||||
Set-Content -Path "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" -Value "@echo off`r`npushd %USERPROFILE%`r`npowershell -ExecutionPolicy Bypass .local\bin\$MY_CMD.ps1 %1`r`npopd"
|
||||
|
||||
# run the command
|
||||
& "$Env:USERPROFILE\.local\bin\$MY_CMD.bat"
|
||||
& "$Env:USERPROFILE\.local\bin\$MY_CMD.bat"
|
||||
@@ -3,15 +3,13 @@
|
||||
# TODO: can we use some of this?
|
||||
# https://github.com/PowerShell/openssh-portable/blob/latestw_all/contrib/win32/openssh/FixUserFilePermissions.ps1
|
||||
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh"))
|
||||
{
|
||||
New-Item -Path "$Env:USERPROFILE/.ssh" -ItemType Directory -Force | out-null
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh")) {
|
||||
New-Item -Path "$Env:USERPROFILE/.ssh" -ItemType Directory -Force | Out-Null
|
||||
#& icacls "$Env:USERPROFILE/.ssh" /inheritance:r
|
||||
#& icacls "$Env:USERPROFILE/.ssh" /grant:r "$Env:USERNAME":"(F)"
|
||||
}
|
||||
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config"))
|
||||
{
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config")) {
|
||||
New-Item -Path "$Env:USERPROFILE/.ssh/config" -ItemType "file" -Value ""
|
||||
#& icacls "$Env:USERPROFILE/.ssh/config" /inheritance:r
|
||||
#& icacls "$Env:USERPROFILE/.ssh/config" /grant:r "$Env:USERNAME":"(F)"
|
||||
@@ -24,14 +22,12 @@ if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config"))
|
||||
# #& icacls "$Env:USERPROFILE/.ssh/authorized_keys" /grant:r "$Env:USERNAME":"(F)"
|
||||
#}
|
||||
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa"))
|
||||
{
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa")) {
|
||||
& ssh-keygen -b 2048 -t rsa -f "$Env:USERPROFILE/.ssh/id_rsa" -q -N """"
|
||||
echo ""
|
||||
}
|
||||
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa.pub"))
|
||||
{
|
||||
if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa.pub")) {
|
||||
& ssh-keygen -y -f "$Env:USERPROFILE/.ssh/id_rsa" > "$Env:USERPROFILE/.ssh/id_rsa.pub"
|
||||
echo ""
|
||||
}
|
||||
@@ -43,4 +39,4 @@ echo ""
|
||||
#rm -f "$Env:USERPROFILE/Downloads/id_rsa.$Env:USERNAME.pub":
|
||||
Copy-Item -Path "$Env:USERPROFILE/.ssh/id_rsa.pub" -Destination "$Env:USERPROFILE/Downloads/id_rsa.$Env:USERNAME.pub"
|
||||
& type "$Env:USERPROFILE/Downloads/id_rsa.$Env:USERNAME.pub"
|
||||
echo ""
|
||||
echo ""
|
||||
Reference in New Issue
Block a user