cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 42daea6c0c9dabb14416101465e18c68cff47632
parent f752e010d98a167908745300abfa69b9223a7833
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu,  4 Jun 2020 00:04:22 +0300

kiss: check for the manifest list before creating the 'dirs' file

Diffstat:
Mkiss | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kiss b/kiss @@ -1052,7 +1052,7 @@ pkg_remove() { # purpose (such as baselayout). manifest_list="$(set +f; pop "$sys_db/$1/manifest" from "$sys_db/"*/manifest)" # shellcheck disable=2086 - grep -h '/$' $manifest_list | sort -ur > "$mak_dir/dirs" + [ $manifest_list ] && grep -h '/$' $manifest_list | sort -ur > "$mak_dir/dirs" run_hook pre-remove "$1" "$sys_db/$1" root @@ -1062,7 +1062,7 @@ pkg_remove() { [ "${file##/etc/*}" ] || continue if [ -d "$KISS_ROOT/$file" ]; then - "$grep" -q "^$file\$" "$mak_dir/dirs" && continue + "$grep" -q "^$file\$" "$mak_dir/dirs" 2>/dev/null && continue rmdir "$KISS_ROOT/$file" 2>/dev/null || continue else rm -f "$KISS_ROOT/$file"