PowerShell/profile.ps1

32 lines
882 B
PowerShell

# Scripts in this $PROFILE\Scripts folder are added to the PATH
$env:PATH += ";$(Split-Path -Parent $MyInvocation.MyCommand.Path)\Scripts"
function prompt {
$prompt = "> "
If ((New-Object Security.Principal.WindowsPrincipal $(
[Security.Principal.WindowsIdentity]::GetCurrent()
)).IsInRole(
[Security.Principal.WindowsBuiltinRole]::Administrator
)
) {
$prompt = "Admin$prompt"
}
$prompt
}
function Install-Scoop {
# You can read the script before executing it here:
# https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1
Invoke-RestMethod get.scoop.sh | Invoke-Expression
# (un)install docs: https://github.com/ScoopInstaller/Install
}
function Install-BleachBit {
if (-not (Get-Command "git" -ErrorAction SilentlyContinue)) {
scoop install git
}
scoop bucket add extras
scoop install bleachbit
}