chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git] / sudo / install.ps1
1 #!/usr/bin/env pwsh
2
3 echo "Installing sudo.cmd..."
4
5 # Couldn't figure out how to get this to work with "here strings", so forgive the ugly, but at least it works
6 Set-Content -Path .local\bin\sudo.cmd -Value "@echo off`r`npowershell -Command ""Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% && %*'""`r`n@echo on"
7
8 # Add to path
9 & "$Env:USERPROFILE\.local\bin\pathman.exe" add ~/.local/bin
10
11 echo "Installed to '$Env:USERPROFILE\.local\bin\sudo.cmd'"
12 echo ""