PowerShell-Profile/RdzeN-Profile.ps1
Tomasz Kostrzewa 2c28c05a0d new file: RdzeN-Profile.ps1
new file:   functions/New-SimulateTyping.ps1
	new file:   functions/Reload-Profile.ps1
2024-03-05 18:24:19 +01:00

36 lines
1.1 KiB
PowerShell

# gitea.RdzeN.net
#
# Example Powershell Profile.
#
# 1. Check if GITEA folder exists.
$path_gitea = "$($env:USERPROFILE)\GITEA"
$path_gitea_powershell_profile = "$path_gitea\PowerShell-Profile"
$path_gitea_powershell_profile_functions = "$path_gitea_powershell_profile\functions"
if (-not (Test-Path $path_gitea)) {
New-Item -ItemType Directory -Path $path_gitea | Out-Null
}
if (-not (Test-Path $path_gitea_powerShell_profile )) {
New-Item -ItemType Directory -Path $path_gitea_powerShell_profile | Out-Null
}
if (-not (Test-Path $path_gitea_powershell_profile_functions )) {
New-Item -ItemType Directory -Path $path_gitea_powershell_profile_functions | Out-Null
}
# 2. Download / pull GIT REPO
if (-not (Get-ChildItem $path_gitea_powershell_profile_functions).count -gt 0) {
Set-Location $path_gitea
$RepositoryURL = "https://gitea.rdzen.net/najlepszytomasz/PowerShell-Profile.git"
git clone $RepositoryURL -q
} else {
Set-Location $path_gitea_powershell_profile
git pull -q
}
# 3. dot source functions.
# 99. Reload Profile
#Reload-Profile