aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-07-13 01:05:01 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-07-14 13:58:07 +0200
commitf70105edc80b1ee90b9bd31ef6b8bcf7c44bbc4e (patch)
tree0e44f0a3b3e74df192fc15754d118e4977bf5db3 /gen_funcs.sh
parentgen_funcs.sh: arch_replace(): Make use of get_useful_function_stack() (diff)
downloadgenkernel-f70105edc80b1ee90b9bd31ef6b8bcf7c44bbc4e.tar.gz
genkernel-f70105edc80b1ee90b9bd31ef6b8bcf7c44bbc4e.tar.bz2
genkernel-f70105edc80b1ee90b9bd31ef6b8bcf7c44bbc4e.zip
gen_funcs.sh: cache_replace(): Make use of get_useful_function_stack()
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-xgen_funcs.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index f8592e5..b0e6399 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -211,7 +211,10 @@ arch_replace() {
}
cache_replace() {
- var_replace "CACHE" "${CACHE_DIR}/${GK_V}" "${1}"
+ [[ ${#} -ne 1 ]] \
+ && gen_die "$(get_useful_function_stack "${FUNCNAME}")Invalid usage of ${FUNCNAME}(): Function takes exactly one argument (${#} given)!"
+
+ var_replace "CACHE" "${GK_V_CACHEDIR}" "${1}"
}
clear_log() {