tazinst rev 100
Remove cat process
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 20 12:17:10 2019 +0200 (2019-10-20) |
parents | d41f08c53b3e |
children | 37246fc2557b |
files | tazinst |
line diff
1.1 --- a/tazinst Mon Mar 04 14:16:21 2019 -0500 1.2 +++ b/tazinst Sun Oct 20 12:17:10 2019 +0200 1.3 @@ -1242,8 +1242,8 @@ 1.4 mount_cdrom() 1.5 { 1.6 # set device name 1.7 - local drive="$(cat /proc/sys/dev/cdrom/info | \ 1.8 - grep "drive name" | cut -f 3)" 1.9 + local drive="$(grep "drive name" < \ 1.10 + /proc/sys/dev/cdrom/info | cut -f 3)" 1.11 [ -n "$drive" ] || drive=cdrom 1.12 local cdrom=/dev/$drive 1.13 # mount cdrom 1.14 @@ -1277,7 +1277,7 @@ 1.15 # check integrity 1.16 local md5file=$(printf "%s" $SOURCE | sed 's/.iso$/.md5/') 1.17 if [ -r "$md5file" ]; then 1.18 - local md5ref="$(cat "$md5file" | cut -d' ' -f1)" 1.19 + local md5ref="$(cut -d' ' -f1 < "$md5file")" 1.20 local md5calc="$(md5sum $SOURCE | cut -d' ' -f1)" 1.21 if [ ! "$md5calc" = "$md5ref" ]; then 1.22 log "md5sum iso=$md5ref md5sum tazinst=$md5calc" 1.23 @@ -2112,7 +2112,7 @@ 1.24 log "$(_ 'Checking the availability of packages...')" 1.25 touch packages-to-install.list 1.26 packages=0 1.27 - diff="$(cat packages-selection.diff | sort)" 1.28 + diff="$(sort < packages-selection.diff)" 1.29 for pkg in $diff 1.30 do 1.31 if grep -q ^$pkg-[0-9] /var/lib/tazpkg/packages.list; then 1.32 @@ -2127,7 +2127,7 @@ 1.33 log "$(_ 'packages to install: 0')" 1.34 else 1.35 # get-install all missing pkgs. 1.36 - for pkg in $(cat packages-to-install.list) 1.37 + while read pkg 1.38 do 1.39 log "$(_ 'Installing: %s...' "$pkg")" 1.40 # get install package and answer yes in case of dependencies. 1.41 @@ -2136,7 +2136,7 @@ 1.42 yes "" | /usr/bin/tazpkg install $pkgname.tazpkg \ 1.43 --root=$TARGET_ROOT >/dev/null 2>/dev/null 1.44 rm -f $pkgname.tazpkg 1.45 - done 1.46 + done < packages-to-install.list 1.47 fi 1.48 log "$(_ 'Installation of packages complete...')" 1.49 }