tazlito rev 522

Remove cat process
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 20 12:29:01 2019 +0200 (7 weeks ago)
parents a69a2b8d6d89
children 69ddff8a21b0
files tazlito
line diff
     1.1 --- a/tazlito	Tue Sep 24 12:47:30 2019 +0300
     1.2 +++ b/tazlito	Sun Oct 20 12:29:01 2019 +0200
     1.3 @@ -1005,7 +1005,7 @@
     1.4  	# First part (lzcat or zcat) may not fail, but cpio will fail on incorrect format
     1.5  	(cd "$2"; lzcat "$1" | cpio -idm --quiet 2>/dev/null) && return
     1.6  	(cd "$2";  zcat "$1" | cpio -idm --quiet 2>/dev/null) && return
     1.7 -	(cd "$2";   cat "$1" | cpio -idm --quiet 2>/dev/null)
     1.8 +	(cd "$2"; cpio -idm --quiet 2>/dev/null < "$1")
     1.9  }
    1.10  
    1.11  
    1.12 @@ -1764,11 +1764,11 @@
    1.13  
    1.14  	# Remove other files blindly
    1.15  	for i in $1$INSTALLED/*/files.list; do
    1.16 -		for file in $(cat "$i"); do
    1.17 +		while read file; do
    1.18  			[ "$1$file" -nt "$i" ] && continue
    1.19  			[ -f "$1$file" -a ! -L "$1$file" ] && continue
    1.20  			[ -d "$1$file" ] || rm -f "$1$file"
    1.21 -		done
    1.22 +		done < $i
    1.23  	done
    1.24  
    1.25  	# Remove tazpkg files and tmp files
    1.26 @@ -2785,7 +2785,7 @@
    1.27  			newline
    1.28  			echo 'Preparing non-free packages...'
    1.29  			cp 'non-free.list' "$ROOTFS/etc/tazlito/non-free.list"
    1.30 -			for pkg in $(cat 'non-free.list'); do
    1.31 +			while read pkg ; do
    1.32  				if [ ! -d "$INSTALLED/$pkg" ]; then
    1.33  					if [ ! -d "$INSTALLED/get-$pkg" ]; then
    1.34  						tazpkg get-install get-$pkg
    1.35 @@ -2796,7 +2796,7 @@
    1.36  				pkg=$(ls $pkg*.tazpkg)
    1.37  				grep -q "^$pkg$" $LIST_NAME || echo $pkg >> $LIST_NAME
    1.38  				mv $pkg $PACKAGES_REPOSITORY
    1.39 -			done
    1.40 +			done < non-free.list
    1.41  		fi
    1.42  		cp $LIST_NAME $DISTRO/distro-packages.list
    1.43  		newline