From 9792496e1ae519226b21f419dc6a9db545bab27d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 3 Oct 2020 08:20:21 +0300 Subject: [PATCH] kiss: drop KISS_GREP --- kiss | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kiss b/kiss index 77a33fd..e464df3 100755 --- a/kiss +++ b/kiss @@ -154,7 +154,7 @@ pkg_owner() { [ "$3" ] || set -- "$1" "$2" "$sys_db"/*/manifest - pkg_owner=$("$grep" "$@") + pkg_owner=$(grep "$@") pkg_owner=${pkg_owner%/*} pkg_owner=${pkg_owner##*/} @@ -876,7 +876,7 @@ pkg_conflicts() { [ "$#" != 0 ] || return 0 # Store the list of found conflicts in a file for reuse. - "$grep" -Fxf "$tmp_dir/.manifest" -- "$@" 2>/dev/null \ + grep -Fxf "$tmp_dir/.manifest" -- "$@" 2>/dev/null \ > "$tmp_dir/.conflicts" ||: if [ "$KISS_CHOICE" != 0 ] && [ -s "$tmp_dir/.conflicts" ]; then @@ -1031,7 +1031,7 @@ pkg_remove_files() { case $file in /etc/?*[!/]) sum_sys=$(sh256 "$KISS_ROOT/$file") ||: - sum_old=$("$grep" -F "$sum_sys" "$tmp_dir/.etcsums") ||: + sum_old=$(grep -F "$sum_sys" "$tmp_dir/.etcsums") ||: [ "$sum_sys" = "$sum_old" ] || { printf 'Skipping %s (modified)\n' "$file" @@ -1101,7 +1101,7 @@ pkg_remove() { [ "$KISS_FORCE" = 1 ] || ( cd "$sys_db" set +f - ! "$grep" -lFx "$1" -- */depends + ! grep -lFx "$1" -- */depends ) || die "$1" "can't remove package, others depend on it" @@ -1197,7 +1197,7 @@ pkg_install() { log "$pkg" "installing package" pkg_install_files -z "$tar_dir/$pkg" - "$grep" -vFxf "$sys_db/$pkg/manifest" "$tmp_dir/.manifest" \ + grep -vFxf "$sys_db/$pkg/manifest" "$tmp_dir/.manifest" \ 2>/dev/null | pkg_remove_files log "$pkg" "verifying installation" @@ -1567,9 +1567,6 @@ main() { command -v llvm-readelf )"} || elf_cmd=ldd - # Allow users to override default grep. - grep=${KISS_GREP:=grep} - # Store the date and time of script invocation to be used as the name of # the log files the package manager creates uring builds. date=$(date +%Y-%m-%d-%H:%M:%S)