Less naive method of template name construction
This commit is contained in:
parent
7f38babc0a
commit
fa134bd512
7
Makefile
7
Makefile
@ -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
|
||||
|
1
builder_setup
Normal file → Executable file
1
builder_setup
Normal file → Executable file
@ -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…
Reference in New Issue
Block a user