Skip to content

Commit fd2fbbb

Browse files
authored
Create direactories (#6)
1 parent 1824e37 commit fd2fbbb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ will then just work out of the box.
1616

1717
Note that this action will define `GALLIUM_DRIVER` environnement variable that is needed for mesa to work as expected.
1818

19+
The path can contain wildcards, which means the mesa files can be copied to multiple directories in a single action use.
20+
If the directories do not exists, they will be created.
21+
1922
## Defining mesa version
2023

2124
Which mesa version to use can be set like this:

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ runs:
2828
cd install_mesa_local_dir
2929
curl.exe -L --output install_mesa_local_archive.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/${{inputs.version}}/mesa3d-${{inputs.version}}-release-msvc.7z
3030
C:\'Program Files'\7-Zip\7z.exe x install_mesa_local_archive.7z
31+
# Create the directories if they do not exist
32+
Get-ChildItem -Directory ${{inputs.path}}* | ForEach-Object { New-Item -ItemType Directory -Force -Path $_ }
3133
# A * is added next line to force Get-ChildItem to look for directory within the path
3234
Get-ChildItem -Directory ${{inputs.path}}* | ForEach-Object { Copy-Item -Path .\x64\opengl32.dll, .\x64\libglapi.dll, .\x64\libgallium_wgl.dll -Destination $_ }
3335
echo "GALLIUM_DRIVER=llvmpipe"| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

0 commit comments

Comments
 (0)