From f1266335e74400520180b10919bd916a7d9a2233 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 8 Jul 2021 00:43:44 +0200 Subject: [PATCH] Ports: Add './package.sh shell' to get a shell with the build env set --- Ports/.port_include.sh | 11 ++++++++++- Ports/README.md | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 08a6bcc41c7..fd6f7dff7ae 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -489,13 +489,22 @@ do_all() { do_install "${1:-}" } +do_shell() { + do_installdepends + do_fetch + do_patch + cd "$workdir" + bash + echo "End of package shell. Back to the User shell." +} + NO_GPG=false parse_arguments() { if [ -z "${1:-}" ]; then do_all else case "$1" in - fetch|patch|configure|build|install|installdepends|clean|clean_dist|clean_all|uninstall|showproperty) + fetch|patch|shell|configure|build|install|installdepends|clean|clean_dist|clean_all|uninstall|showproperty) method=$1 shift do_${method} "$@" diff --git a/Ports/README.md b/Ports/README.md index 727fcdd47a6..2b21d1b2863 100644 --- a/Ports/README.md +++ b/Ports/README.md @@ -62,6 +62,10 @@ By default, run `make` with the port's [`makeopts`](#makeopts). By default, run `make install` with the port's [`installopts`](#installopts). +#### `shell` + +Open a shell in the `$workdir` with the build environment set. + #### `installdepends` Install all ports from the port's [`depends`](#depends) list.