Image type

This commit is contained in:
Bob Mottram 2016-01-05 14:54:32 +00:00
parent 58b37a35b9
commit 975de7039c
2 changed files with 113 additions and 102 deletions

View File

@ -50,6 +50,7 @@ VMDEBOOTSTRAP_REPO=git://git.liw.fi/vmdebootstrap
VMDEBOOTSTRAP_VERSION=0.8
MAKEFILE=${PROJECT_NAME}-image-makefile
IMAGE_SIZE=4G
IMAGE_TYPE='full'
USERNAME=$(echo $USER)
PASSWORD=
@ -258,6 +259,14 @@ rm -rf $BUILD_DIR/vendor
chown -R $CURR_USER:$CURR_USER $BUILD_DIR
cd $BUILD_DIR
if [[ $MINIMAL_INSTALL == "yes" ]]; then
IMAGE_TYPE='min'
fi
if [[ $ONION_ONLY != "no" ]]; then
IMAGE_TYPE='onion'
fi
cd $BUILD_DIR
make $IMAGE_TYPE \
USERNAME="$USERNAME" \
@ -273,7 +282,8 @@ make $IMAGE_TYPE \
GENERIC_IMAGE="$GENERIC_IMAGE" \
MINIMAL_INSTALL="$MINIMAL_INSTALL" \
SSH_PORT="$SSH_PORT" \
ONION_ONLY="$ONION_ONLY"
ONION_ONLY="$ONION_ONLY" \
IMAGE_TYPE="$IMAGE_TYPE"
if [ ! "$?" = "0" ]; then
echo $'Build failed'

View File

@ -30,6 +30,7 @@
MIRROR ?= http://httpredir.debian.org/debian
BUILD_MIRROR ?= http://httpredir.debian.org/debian
IMAGE_SIZE ?= 8G
IMAGE_TYPE ?= 'full'
SUITE ?= jessie
# include source packages in image?
SOURCE ?= false
@ -37,7 +38,7 @@ SOURCE ?= false
# yes no
BUILD = $(MACHINE)-$(ARCHITECTURE)
TODAY := $(shell date +%Y-%m-%d)
NAME = build/$(PROJECT_NAME)-$(TODAY)_$(BUILD)
NAME = build/$(PROJECT_NAME)-$(IMAGE_TYPE)-$(TODAY)_$(BUILD)
IMAGE = $(NAME).img
ARCHIVE = $(NAME).tar.bz2
SIGNATURE = $(ARCHIVE).sig