File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ _usage () {
2222 echo " General options:"
2323 echo " -o | --build-opiton \" [options]\" Set build options passed to build.sh"
2424 echo " -d | --dist-out-dir \" [path]\" Set distributions' output directory"
25+ echo " -w | --work-dir \" [path]\" Set build working dir for debug"
2526 echo " -n | --noninteractive The process will not ask you any questions"
2627 echo " -c | --clean Enable --no-cache option when building docker image"
2728 echo " -s | --no-share-pkgfile Disable pacman pkgcache"
@@ -64,6 +65,14 @@ while (( $# > 0 )); do
6465 DIST_DIR=$( cd -P ${2} && pwd)
6566 shift 2
6667 ;;
68+ -w | --work-dir)
69+ mkdir -p ${2} || {
70+ echo " Error: failed creating working directory: ${2} " 1>&2
71+ exit 1
72+ }
73+ EXTERNAL_WORK_DIR=$( cd -P ${2} && pwd)
74+ shift 2
75+ ;;
6776 -n | --noninteractive)
6877 BUILD_SCRIPT_OPTS+=(--noconfirm)
6978 shift 1
108117DOCKER_RUN_OPTS=()
109118DOCKER_RUN_OPTS+=(-v " ${DIST_DIR} :/alterlinux/out" )
110119DOCKER_RUN_OPTS+=(-v " /usr/lib/modules:/usr/lib/modules:ro" )
120+ [[ " x${EXTERNAL_WORK_DIR} " != " x" ]] && \
121+ DOCKER_RUN_OPTS+=(-v " ${EXTERNAL_WORK_DIR} :/alterlinux/work" )
111122[[ " x${NO_SHARE_PKG} " != " xTrue" ]] && {
112123 DOCKER_RUN_OPTS+=(-v " ${SHARE_PKG_DIR} :/var/cache/pacman/pkg" )
113124 DOCKER_RUN_OPTS+=(-v " ${SHARE_DB_DIR} :/var/lib/pacman/sync" )
You can’t perform that action at this time.
0 commit comments