From: Eugene Syromyatnikov Date: Mon, 31 Jul 2017 17:21:39 +0000 (+0200) Subject: tests/strace-V.test: rename getval to getstr X-Git-Tag: v4.19~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec7a06501de68286f97d134fae62a869f8b21f1b;p=strace tests/strace-V.test: rename getval to getstr As this name is more suitable. * tests/strace-V (getval): Rename to getstr, update all call sites. --- diff --git a/tests/strace-V.test b/tests/strace-V.test index 8db13956..37da9d1a 100755 --- a/tests/strace-V.test +++ b/tests/strace-V.test @@ -8,13 +8,13 @@ year="$(date +%Y)" run_strace -V > "$LOG" -getval() +getstr() { sed -r -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"([^"]*)".*/\1/p' \ ../../config.h } -config_year=$(getval COPYRIGHT_YEAR) +config_year=$(getstr COPYRIGHT_YEAR) [ "$year" -ge "$config_year" ] && [ "$config_year" -ge 2017 ] || { echo >&2 "The year derived from config.h (${config_year}) does not pass sanity checks." @@ -22,8 +22,8 @@ config_year=$(getval COPYRIGHT_YEAR) } cat > "$EXP" << __EOF__ -$(getval PACKAGE_NAME) -- version $(getval PACKAGE_VERSION) -Copyright (c) 1991-${config_year} The strace developers <$(getval PACKAGE_URL)>. +$(getstr PACKAGE_NAME) -- version $(getstr PACKAGE_VERSION) +Copyright (c) 1991-${config_year} The strace developers <$(getstr PACKAGE_URL)>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __EOF__