summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions12
1 files changed, 9 insertions, 3 deletions
diff --git a/functions b/functions
index 8eef5b8..eb1bf01 100644
--- a/functions
+++ b/functions
@@ -115,6 +115,8 @@ _add_symlink() {
auto_modules() {
# Perform auto detection of modules via sysfs.
+ local mods=
+
IFS=$'\n' read -rd '' -a mods < \
<(find /sys/devices -name modalias -exec sort -u {} + |
# delimit each input by a newline, expanded in place
@@ -130,6 +132,8 @@ all_modules() {
# $@: filter arguments to grep
local -i count=0
+ local mod=
+
while read -r -d '' mod; do
(( ++count ))
mod=${mod##*/}
@@ -158,7 +162,7 @@ add_module() {
# discovered and added.
# $1: module name
- local module path dep deps field value
+ local module= path= dep= deps= field= value=
local -i ign_errors=0
if [[ $1 = -@(t|-try) ]]; then
@@ -214,6 +218,8 @@ add_full_dir() {
# No parsing is performed and the contents of the directory is added as is.
# $1: path to directory
+ local f=
+
if [[ -n $1 && -d $1 ]]; then
for f in "$1"/*; do
if [[ -d "$f" ]]; then
@@ -278,7 +284,7 @@ add_binary() {
# $2: destination on initcpio (optional, defaults to same as source)
local -a sodeps
- local regex binary dest mode sodep resolved dirname
+ local line= regex= binary= dest= mode= sodep= resolved= dirname=
if [[ ${1:0:1} != '/' ]]; then
binary=$(pathlookup "$1")
@@ -322,7 +328,7 @@ parse_hook() {
# prior to the start of hook processing, and after each hook's build
# function is run.
- local item
+ local item=
for item in $MODULES; do
if [[ ${item:(-1)} = '?' ]]; then