mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
Ports: Add overridable pre_fetch method in .port_include.sh
This adds an overridable pre_fetch method which is called from the fetch method at the very beginning. The pre_fetch method can be overridden in your package.sh script so that you can do any necessary preparations before the fetch method is called.
This commit is contained in:
parent
f2be1f9326
commit
f7161b03ca
2 changed files with 6 additions and 0 deletions
|
@ -177,10 +177,15 @@ func_defined() {
|
||||||
PATH= command -V "$1" > /dev/null 2>&1
|
PATH= command -V "$1" > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func_defined pre_fetch || pre_fetch() {
|
||||||
|
:
|
||||||
|
}
|
||||||
func_defined post_fetch || post_fetch() {
|
func_defined post_fetch || post_fetch() {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
fetch() {
|
fetch() {
|
||||||
|
pre_fetch
|
||||||
|
|
||||||
if [ "$auth_type" = "sig" ] && [ ! -z "${auth_import_key}" ]; then
|
if [ "$auth_type" = "sig" ] && [ ! -z "${auth_import_key}" ]; then
|
||||||
# import gpg key if not existing locally
|
# import gpg key if not existing locally
|
||||||
# The default keyserver keys.openpgp.org prints "new key but contains no user ID - skipped"
|
# The default keyserver keys.openpgp.org prints "new key but contains no user ID - skipped"
|
||||||
|
|
|
@ -261,6 +261,7 @@ build() {
|
||||||
The following can be overridden, the names should be self-explanatory as they
|
The following can be overridden, the names should be self-explanatory as they
|
||||||
mostly match the [available options](#options):
|
mostly match the [available options](#options):
|
||||||
|
|
||||||
|
- `pre_fetch`
|
||||||
- `post_fetch`
|
- `post_fetch`
|
||||||
- `pre_configure`
|
- `pre_configure`
|
||||||
- `configure`.
|
- `configure`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue