From 0da80a18416aac03312a5a665c119144dd6f227e Mon Sep 17 00:00:00 2001 From: Laszlo Gombos Date: Sun, 13 Mar 2022 17:04:10 +0000 Subject: [PATCH] refactor(base): remove `str_replace` from `dracut-lib.sh` Remove duplicate implementation of `str_replace` to follow-up commit 148e420be5b5809aa8d5033f47477573bbbf3e60 --- modules.d/99base/dracut-lib.sh | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 44dd0178a..2529af666 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -103,26 +103,6 @@ vinfo() { done } -# replaces all occurrences of 'search' in 'str' with 'replacement' -# -# str_replace str search replacement -# -# example: -# str_replace ' one two three ' ' ' '_' -str_replace() { - local in="$1" - local s="$2" - local r="$3" - local out='' - - while strstr "${in}" "$s"; do - chop="${in%%"$s"*}" - out="${out}${chop}$r" - in="${in#*"$s"}" - done - echo "${out}${in}" -} - killall_proc_mountpoint() { local _pid local _killed=0 -- 2.47.3