File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,10 +123,15 @@ copy_payload() {
123123 done
124124
125125 [ -d " $REPO_ROOT /wordlists" ] && run_cmd cp -R " $REPO_ROOT /wordlists" " $destination_root /"
126+ if [ -d " $REPO_ROOT /docs/images" ]; then
127+ run_cmd mkdir -p " $destination_root /docs"
128+ run_cmd cp -R " $REPO_ROOT /docs/images" " $destination_root /docs/"
129+ fi
126130 if [ " $include_specs " = " yes" ] && [ -d " $REPO_ROOT /spec" ]; then
127131 run_cmd cp -R " $REPO_ROOT /spec" " $destination_root /"
128132 fi
129133
134+ run_cmd find " $destination_root " -type f -name ' README.md' ! -path " $destination_root /README.md" -delete
130135 run_cmd mkdir -p " $destination_root /output" " $destination_root /tmp" " $destination_root /vendor"
131136}
132137
Original file line number Diff line number Diff line change @@ -123,10 +123,15 @@ copy_payload() {
123123 done
124124
125125 [ -d " $REPO_ROOT /wordlists" ] && run_cmd cp -R " $REPO_ROOT /wordlists" " $destination_root /"
126+ if [ -d " $REPO_ROOT /docs/images" ]; then
127+ run_cmd mkdir -p " $destination_root /docs"
128+ run_cmd cp -R " $REPO_ROOT /docs/images" " $destination_root /docs/"
129+ fi
126130 if [ " $include_specs " = " yes" ] && [ -d " $REPO_ROOT /spec" ]; then
127131 run_cmd cp -R " $REPO_ROOT /spec" " $destination_root /"
128132 fi
129133
134+ run_cmd find " $destination_root " -type f -name ' README.md' ! -path " $destination_root /README.md" -delete
130135 run_cmd mkdir -p " $destination_root /output" " $destination_root /tmp" " $destination_root /vendor"
131136}
132137
Original file line number Diff line number Diff line change @@ -181,13 +181,27 @@ function Copy-Payload {
181181 Copy-Item - LiteralPath $wordlists - Destination $DestinationRoot - Recurse - Force
182182 }
183183
184+ $docsImages = Join-Path $RepoRoot " docs\images"
185+ if (Test-Path - LiteralPath $docsImages ) {
186+ $docsRoot = Join-Path $DestinationRoot " docs"
187+ New-Item - ItemType Directory - Path $docsRoot - Force | Out-Null
188+ Copy-Item - LiteralPath $docsImages - Destination $docsRoot - Recurse - Force
189+ }
190+
184191 if ($IncludeSpecs ) {
185192 $specDir = Join-Path $RepoRoot " spec"
186193 if (Test-Path - LiteralPath $specDir ) {
187194 Copy-Item - LiteralPath $specDir - Destination $DestinationRoot - Recurse - Force
188195 }
189196 }
190197
198+ $rootReadme = Join-Path $DestinationRoot " README.md"
199+ Get-ChildItem - Path $DestinationRoot - Recurse - File - Filter " README.md" - ErrorAction SilentlyContinue | ForEach-Object {
200+ if ($_.FullName -ine $rootReadme ) {
201+ Remove-Item - LiteralPath $_.FullName - Force - ErrorAction Stop
202+ }
203+ }
204+
191205 foreach ($dir in @ (" output" , " tmp" , " vendor" )) {
192206 New-Item - ItemType Directory - Path (Join-Path $DestinationRoot $dir ) - Force | Out-Null
193207 }
You can’t perform that action at this time.
0 commit comments