Browse Source

Replace misleading 'variables' concept ('tokens' seems better)

Alois Mahdal 8 years ago
parent
commit
8d0f88ea74
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      src/include/build.sh

+ 6
- 6
src/include/build.sh View File

25
     #
25
     #
26
     local ftype="$1"
26
     local ftype="$1"
27
     case $ftype in
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
         *)              die "unknown file type: $ftype" ;;
31
         *)              die "unknown file type: $ftype" ;;
32
     esac
32
     esac
33
 }
33
 }
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
     local script=$(mktemp --tmpdir mkit-tmp.XXXXXXXXXX)
64
     local script=$(mktemp --tmpdir mkit-tmp.XXXXXXXXXX)
65
     local section varname varvalue
65
     local section varname varvalue
82
         echo "s|__MKIT_PROJ_VERSION__|$(semver)|g;"
82
         echo "s|__MKIT_PROJ_VERSION__|$(semver)|g;"
83
         echo "s|__MKIT_SELF_VERSION__|$MKIT_VERSION|g;"
83
         echo "s|__MKIT_SELF_VERSION__|$MKIT_VERSION|g;"
84
     } >> "$script"
84
     } >> "$script"
85
-    perl -wp "$script" || die "_expand_variables failed"
85
+    perl -wp "$script" || die "_expand_tokens failed"
86
     rm "$script"
86
     rm "$script"
87
 }
87
 }
88
 
88