Skip to content

Commit 0b7cd07

Browse files
committed
guix: Move OUTDIR determination+creation to guix-build.sh
1 parent d27ff8b commit 0b7cd07

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

contrib/guix/guix-build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ time-machine() {
9191
-- "$@"
9292
}
9393

94+
# Make sure an output directory exists for our builds
95+
OUTDIR="${OUTDIR:-${PWD}/output}"
96+
[ -e "$OUTDIR" ] || mkdir -p "$OUTDIR"
97+
9498
#########
9599
# Build #
96100
#########
@@ -189,6 +193,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
189193
--pure \
190194
--no-cwd \
191195
--share="$PWD"=/bitcoin \
196+
--share="$OUTDIR"=/outdir \
192197
--expose="$(git rev-parse --git-common-dir)" \
193198
${SOURCES_PATH:+--share="$SOURCES_PATH"} \
194199
--max-jobs="$MAX_JOBS" \
@@ -199,6 +204,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv
199204
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
200205
${V:+V=1} \
201206
${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
207+
OUTDIR=/outdir \
202208
bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh"
203209
)
204210

contrib/guix/libexec/build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ echo "At most ${MAX_JOBS:?not set} jobs will run at once..."
2323
# $HOSTs after successfully building.
2424
BASEPREFIX="${PWD}/depends"
2525

26-
# Setup an output directory for our build
27-
OUTDIR="${OUTDIR:-${PWD}/output}"
28-
[ -e "$OUTDIR" ] || mkdir -p "$OUTDIR"
29-
3026
# Setup the directory where our Bitcoin Core build for HOST will occur
3127
DISTSRC="${DISTSRC:-${PWD}/distsrc-${HOST}}"
3228
if [ -e "$DISTSRC" ]; then

0 commit comments

Comments
 (0)