scripts: Fix multiple shellcheck warnings

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8564 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-08-25 22:51:57 +00:00
parent ee24c6bab2
commit c205138e87
8 changed files with 47 additions and 41 deletions
+5 -4
View File
@@ -24,13 +24,14 @@ function usage {
}
script_dir="$(dirname $0)"
script_dir="$(dirname "$0")"
if [ "${script_dir#/}" = "${script_dir}" ]; then
script_dir="$PWD/$script_dir"
fi
scriptdir="${scriptdir%/.}"
scst_dir="$(dirname "${script_dir}")"
# shellcheck source=./kernel-functions
source "${script_dir}/kernel-functions"
if [ "$1" = "" ]; then
@@ -49,9 +50,9 @@ cd "${target}" || exit $?
"${script_dir}/list-source-files" "${scst_dir}" |
grep -- "-${kernel_version}.*.patch$" |
grep -v /in-tree/ |
while read p; do
if [ "${p/readahead-2.6.32.below11.patch//}" = "$p" \
-o "${patchlevel:-0}" -lt 11 ]; then
while read -r p; do
if [ "${p/readahead-2.6.32.below11.patch//}" = "$p" ] ||
[ "${patchlevel:-0}" -lt 11 ]; then
echo "==== $p"
patch -p1 <"${scst_dir}/$p"
fi