Allow global and personal profile files
This commit is contained in:
parent
eaf9ed7f8a
commit
53ed5bb8c0
1 changed files with 9 additions and 4 deletions
|
@ -3,14 +3,19 @@ env: []
|
||||||
path: []
|
path: []
|
||||||
script:
|
script:
|
||||||
- value: |
|
- 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"
|
if: match .Shell "bash"
|
||||||
- value: |
|
- value: |
|
||||||
# Profile Files
|
# Profile Files
|
||||||
$profileRoot = Split-Path -Parent $PROFILE;
|
$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"
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($profilePath in $profilePaths) {
|
||||||
if (Test-Path $profilePath) {
|
if (Test-Path $profilePath) {
|
||||||
Get-Item $profilePath | ForEach-Object { . $_; };
|
Get-Item $profilePath | ForEach-Object { . $_; };
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if: match .Shell "pwsh"
|
if: match .Shell "pwsh"
|
||||||
|
|
Loading…
Reference in a new issue