Allow global and personal profile files

This commit is contained in:
Manuel Thalmann 2024-03-20 19:43:40 +01:00
parent eaf9ed7f8a
commit 53ed5bb8c0

View file

@ -3,14 +3,19 @@ env: []
path: []
script:
- value: |
[ -f /bash/conf.d/* ] && . /bash/conf.d/* || true
[ -f /bash/conf.d/* ~/.config/bash/conf.d/* ] && . /bash/conf.d/* ~/.config/bash/conf.d/* || true
if: match .Shell "bash"
- value: |
# Profile Files
$profileRoot = Split-Path -Parent $PROFILE;
$profilePath = "$profileRoot/profile.d/*.ps1";
$profilePaths = @(
"$profileRoot/profile.d/*.ps1",
"{{ if eq .OS "windows" }}C:/ProgramData{{ else }}/etc/powershell{{ end }}/profile.d"
);
if (Test-Path $profilePath) {
Get-Item $profilePath | ForEach-Object { . $_; };
foreach ($profilePath in $profilePaths) {
if (Test-Path $profilePath) {
Get-Item $profilePath | ForEach-Object { . $_; };
}
}
if: match .Shell "pwsh"