Skip to content

Commit 0da80a1

Browse files
LaszloGombosjohannbg
authored andcommitted
refactor(base): remove str_replace from dracut-lib.sh
Remove duplicate implementation of `str_replace` to follow-up commit 148e420
1 parent d7d80af commit 0da80a1

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

modules.d/99base/dracut-lib.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,6 @@ vinfo() {
103103
done
104104
}
105105

106-
# replaces all occurrences of 'search' in 'str' with 'replacement'
107-
#
108-
# str_replace str search replacement
109-
#
110-
# example:
111-
# str_replace ' one two three ' ' ' '_'
112-
str_replace() {
113-
local in="$1"
114-
local s="$2"
115-
local r="$3"
116-
local out=''
117-
118-
while strstr "${in}" "$s"; do
119-
chop="${in%%"$s"*}"
120-
out="${out}${chop}$r"
121-
in="${in#*"$s"}"
122-
done
123-
echo "${out}${in}"
124-
}
125-
126106
killall_proc_mountpoint() {
127107
local _pid
128108
local _killed=0

0 commit comments

Comments
 (0)