blobs: Add support for separate entry source path on disk
This commit is contained in:
parent
a644a921c9
commit
b49d32c4dd
3 changed files with 11 additions and 2 deletions
|
@ -53,7 +53,7 @@ export async function generateBuild(
|
|||
for (let entry of entries) {
|
||||
let ext = path.extname(entry.path)
|
||||
let pathParts = entry.path.split('/')
|
||||
let srcPath = `${source}/${entry.srcPath}`
|
||||
let srcPath = entry.diskSrcPath ?? `${source}/${entry.srcPath}`
|
||||
let stat = await fs.lstat(srcPath)
|
||||
|
||||
if (stat.isSymbolicLink()) {
|
||||
|
|
|
@ -9,7 +9,7 @@ export async function copyBlobs(entries: Iterable<BlobEntry>, srcDir: string, de
|
|||
|
||||
for (let entry of entries) {
|
||||
let outPath = `${destDir}/${entry.srcPath}`
|
||||
let srcPath = `${srcDir}/${entry.srcPath}`
|
||||
let srcPath = entry.diskSrcPath ?? `${srcDir}/${entry.srcPath}`
|
||||
spinner.text = entry.srcPath
|
||||
|
||||
// Symlinks are created at build time, not copied
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
import { EXT_PARTITIONS } from '../util/partitions'
|
||||
|
||||
export interface BlobEntry {
|
||||
// Android partition
|
||||
partition: string
|
||||
// Sub-partition path
|
||||
path: string
|
||||
// Combined partition path without "system/"
|
||||
srcPath: string
|
||||
|
||||
// Path to copy file from on host (default = srcDir/srcPath)
|
||||
diskSrcPath?: string
|
||||
|
||||
// Whether to keep the original signature (for APKs only)
|
||||
isPresigned: boolean
|
||||
// Whether to force creating a named dependency module
|
||||
isNamedDependency: boolean
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue