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
|
ifndef DIST
|
||||||
$(error "You must set DIST variable, e.g. DIST=fc14")
|
$(error "You must set DIST variable, e.g. DIST=fc14")
|
||||||
endif
|
endif
|
||||||
|
export DIST
|
||||||
|
|
||||||
#TODO: build template name somehow smarter
|
dist_ver := $(shell DIST=$(DIST) ./builder_setup)
|
||||||
TEMPLATE_NAME := $${DIST/fc/fedora-}-x64
|
DISTRIBUTION := $(word 1,$(dist_ver))
|
||||||
|
DIST_VERSION := $(word 2,$(dist_ver))
|
||||||
|
TEMPLATE_NAME := $(DISTRIBUTION)-$(DIST_VERSION)-x64
|
||||||
ifdef TEMPLATE_FLAVOR
|
ifdef TEMPLATE_FLAVOR
|
||||||
TEMPLATE_NAME := $(TEMPLATE_NAME)-$(TEMPLATE_FLAVOR)
|
TEMPLATE_NAME := $(TEMPLATE_NAME)-$(TEMPLATE_FLAVOR)
|
||||||
endif
|
endif
|
||||||
|
1
builder_setup
Normal file → Executable file
1
builder_setup
Normal file → Executable file
@ -22,3 +22,4 @@ fi
|
|||||||
CACHEDIR=cache_$DIST
|
CACHEDIR=cache_$DIST
|
||||||
|
|
||||||
export SCRIPTSDIR CACHEDIR
|
export SCRIPTSDIR CACHEDIR
|
||||||
|
echo $DISTRIBUTION $VERSION
|
||||||
|
@ -6,7 +6,7 @@ RETCODE=0
|
|||||||
|
|
||||||
: ${DIST=fc14}
|
: ${DIST=fc14}
|
||||||
|
|
||||||
. ./builder_setup
|
. ./builder_setup >/dev/null
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
export CLEANIMG=$1
|
export CLEANIMG=$1
|
||||||
export NAME=$2
|
export NAME=$2
|
||||||
|
|
||||||
. ./builder_setup
|
. ./builder_setup >/dev/null
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user