Add environment option to not dispose containers (NOPURGE)

Improve in-comments documentation for various options
master
gdm85 9 years ago
parent 0673b29d1b
commit 2a797d8323

@ -4,10 +4,14 @@
## @author gdm85 ## @author gdm85
## ##
## Automatically build latest version of Bitcoin Core using ## Automatically build latest version of Bitcoin Core using
## Docker containers (LXC) + KVM. ## Docker containers (nested LXC).
## ##
## User can specify target operative systems as arguments. ## User can specify target operative systems as arguments.
## ## Several optional environment variables condition the build:
## - OUTPUTDIR - where input/output volume directories will be read/created
## - SIGNER - id of signer (no signature will be attempted, just directory structure created)
## - COMMIT - commit/branch to use for build, by default is latest tag
## - NOPURGE - set to non-empty to not dispose containers after build
# #
SCRIPTS=$(dirname $(readlink -m $0)) || exit $? SCRIPTS=$(dirname $(readlink -m $0)) || exit $?
@ -158,12 +162,14 @@ echo "Building bitcoin (${HCOMMIT}) for $@" && \
build_all ${CREATED[@]} $@ build_all ${CREATED[@]} $@
RV=$? RV=$?
## cleanup if [ -z "$NOPURGE" ]; then
#echo "Cleaning up created containers..." ## cleanup
for CID in $CREATED; do #echo "Cleaning up created containers..."
docker stop $CID for CID in $CREATED; do
docker rm $CID docker stop $CID
done docker rm $CID
done
fi
## return build exit code ## return build exit code
if [ $RV -eq 0 ]; then if [ $RV -eq 0 ]; then

Loading…
Cancel
Save