Less naive method of template name construction

pull/1/head
Marek Marczykowski-Górecki 10 years ago
parent 7f38babc0a
commit fa134bd512

@ -1,9 +1,12 @@
ifndef DIST
$(error "You must set DIST variable, e.g. DIST=fc14")
endif
export DIST
#TODO: build template name somehow smarter
TEMPLATE_NAME := $${DIST/fc/fedora-}-x64
dist_ver := $(shell DIST=$(DIST) ./builder_setup)
DISTRIBUTION := $(word 1,$(dist_ver))
DIST_VERSION := $(word 2,$(dist_ver))
TEMPLATE_NAME := $(DISTRIBUTION)-$(DIST_VERSION)-x64
ifdef TEMPLATE_FLAVOR
TEMPLATE_NAME := $(TEMPLATE_NAME)-$(TEMPLATE_FLAVOR)
endif

@ -22,3 +22,4 @@ fi
CACHEDIR=cache_$DIST
export SCRIPTSDIR CACHEDIR
echo $DISTRIBUTION $VERSION

@ -6,7 +6,7 @@ RETCODE=0
: ${DIST=fc14}
. ./builder_setup
. ./builder_setup >/dev/null
set -e

@ -3,7 +3,7 @@
export CLEANIMG=$1
export NAME=$2
. ./builder_setup
. ./builder_setup >/dev/null
set -e

Loading…
Cancel
Save