: ${WITHOUT=}
: ${KEEP_CONTAINER=true}
: ${TMPFS="4G"}
+: ${EXEC=false}
dir=$(pwd)
image=registry.gitlab.com/pld-linux/cleanbuild
fi
}
+enter_container() {
+ notice "Entering container for $PACKAGE_NAME"
+ docker exec --user=root -it $name bash
+}
+
package_prepare() {
notice "Fetch sources and install dependencies"
if [ -d $topdir/packages/$PACKAGE_NAME ]; then
parse_options() {
local t
- t=$(getopt -o 'x' --long 'network,no-tmpfs,notmpfs,tmpfs:,keep-container:,with:,without:' -n "$PROGRAM" -- "$@")
+ t=$(getopt -o 'x' --long 'network,exec,no-tmpfs,notmpfs,tmpfs:,keep-container:,with:,without:' -n "$PROGRAM" -- "$@")
[ $? != 0 ] && exit $?
eval set -- "$t"
--network)
NETWORKING=true
;;
+ --exec)
+ EXEC=true
+ ;;
--no-tmpfs|--notmpfs)
TMPFS=false
;;
$TRACING && set -x
local name="cleanbuild-$PACKAGE_NAME"
create_container
+ if $EXEC; then
+ enter_container
+ return
+ fi
package_prepare
package_build
}