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: []
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue