Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct { // Hash is the integrity hashsum for a source item Hash string // RefKey is the reference name for a VCS fragment (branch, tag) declared in the // URI. i.e: "myfile::git+https://example.com/example.git#branch=example" RefKey string // RefValue is the reference value for a VCS fragment declared in the URI. i.e: // myfile::git+https://example.com/example.git#branch=refvalue RefValue string // SourceItemPath is the absolute path to a source item (folder or file) SourceItemPath string // SourceItemURI it the full source item URI. i.e: // "myfile::git+https://example.com/example.git#branch=example" i.e: // "https://example.com/example.tar.gz" SourceItemURI string // SrcDir is the directory where all the source items are symlinked, extracted // and processed by packaging functions. SrcDir string // StartDir is the root where a copied PKGBUILD lives and all the source items // are downloaded. It generally contains the src and pkg folders. StartDir string }
Source defines all the fields accepted by a source item.
func (*Source) Get ¶
Get retrieves the source file from the specified URI.
It parses the URI and determines the source file path and type. If the source file does not exist, it retrieves it from the specified URI. It validates the source file and symlinks any additional source files. Finally, it extracts the source file if necessary.
Returns an error if any step fails.
Click to show internal directories.
Click to hide internal directories.