Skip to content

Commit c11bcca

Browse files
authored
Merge pull request #24 from Kuuuube/tooling-cleanup
Tooling cleanup
2 parents ecfd63b + e362275 commit c11bcca

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build/
2+
dist/
23

34
# Generated by Cargo
45
# will have compiled files and executables

build.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
cargo build --release
22
if (Test-Path ./build) {
3-
Remove-Item -Path ./build -Recurse
3+
Remove-Item -Path ./build/* -Recurse
4+
} else {
5+
New-Item -Path ./build -ItemType directory > $null
6+
}
7+
if (Test-Path ./dist) {
8+
Remove-Item -Path ./dist/* -Recurse
9+
} else {
10+
New-Item -Path ./dist -ItemType directory > $null
411
}
5-
New-Item -Path ./build -ItemType directory > $null
6-
New-Item -Path ./dist -ItemType directory > $null
712
Copy-Item -Path ./target/release/tabletdrivercleanup.exe -Destination ./build
813
Copy-Item -Path ./eng/dump.bat -Destination ./build
914
Copy-Item -Path ./eng/dry_run.bat -Destination ./build

eng/dump.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ tabletdrivercleanup.exe --dump
1111
pnputil /enum-drivers > .\dumps\pnputil_drivers.txt
1212
pnputil /enum-devices /connected /drivers > .\dumps\pnputil_devices.txt
1313

14-
md .\dumps\DriverStore
14+
mkdir ".\dumps\DriverStore" 2>nul
1515

1616
for /D %%G in ("C:\Windows\System32\DriverStore\FileRepository\*") DO (
17-
md .\dumps\DriverStore\%%~nxG
17+
mkdir ".\dumps\DriverStore\%%~nxG" 2>nul
1818
for /F %%H in ("%%~G\*.inf") DO (
19-
xcopy /Q /Y "%%H" .\dumps\DriverStore\%%~nxG > nul
19+
xcopy /Q /Y "%%~H" ".\dumps\DriverStore\%%~nxG" >nul
2020
<nul set /p "=Dumped '%%~nxH' !CR!"
2121
)
2222
)

0 commit comments

Comments
 (0)