|
@@ -25,9 +25,9 @@ _build1_ftype() {
|
25
|
25
|
#
|
26
|
26
|
local ftype="$1"
|
27
|
27
|
case $ftype in
|
28
|
|
- MKIT_COMMON) _expand_variables "vars" ;;
|
29
|
|
- markdown) _expand_includes | _expand_variables "vars" ;;
|
30
|
|
- rpmstuff) _expand_variables "vars" "rpmstuff:vars" ;;
|
|
28
|
+ MKIT_COMMON) _expand_tokens "tokens" ;;
|
|
29
|
+ markdown) _expand_includes | _expand_tokens "tokens" ;;
|
|
30
|
+ rpmstuff) _expand_tokens "tokens" "rpmstuff:tokens" ;;
|
31
|
31
|
*) die "unknown file type: $ftype" ;;
|
32
|
32
|
esac
|
33
|
33
|
}
|
|
@@ -57,9 +57,9 @@ _expand_includes() {
|
57
|
57
|
'
|
58
|
58
|
}
|
59
|
59
|
|
60
|
|
-_expand_variables() {
|
|
60
|
+_expand_tokens() {
|
61
|
61
|
#
|
62
|
|
- # Expand variables from sections $@
|
|
62
|
+ # Expand tokens from sections $@
|
63
|
63
|
#
|
64
|
64
|
local script=$(mktemp --tmpdir mkit-tmp.XXXXXXXXXX)
|
65
|
65
|
local section varname varvalue
|
|
@@ -82,7 +82,7 @@ _expand_variables() {
|
82
|
82
|
echo "s|__MKIT_PROJ_VERSION__|$(semver)|g;"
|
83
|
83
|
echo "s|__MKIT_SELF_VERSION__|$MKIT_VERSION|g;"
|
84
|
84
|
} >> "$script"
|
85
|
|
- perl -wp "$script" || die "_expand_variables failed"
|
|
85
|
+ perl -wp "$script" || die "_expand_tokens failed"
|
86
|
86
|
rm "$script"
|
87
|
87
|
}
|
88
|
88
|
|