diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-10 09:33:39 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-10 20:17:47 +0200 |
commit | 9606474215748ba68b32fd8b89360d0e165b3651 (patch) | |
tree | f0c118d672415cd177fb5ad93fe26a29c0adc96d /scripts | |
parent | 85b62a4c2df9669799eb250d1c23efac7d1c1fc6 (diff) | |
download | ptxdist-9606474215748ba68b32fd8b89360d0e165b3651.tar.gz ptxdist-9606474215748ba68b32fd8b89360d0e165b3651.tar.xz |
useless use of cat
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/git-ptx-patches | 2 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_world_clean.sh | 4 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_common.sh | 2 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_finish.sh | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches index 619e0c935..747380706 100755 --- a/scripts/git-ptx-patches +++ b/scripts/git-ptx-patches @@ -22,7 +22,7 @@ tag=base if grep -q "$PTX_PATCHES_HEADER" .ptxdist/series; then echo "Found series file generated by git-ptx-patches." - lines=$(cat .ptxdist/series | wc -l) + lines=$(wc -l < .ptxdist/series) lines=$[lines-1] magic=$(head -n$lines .ptxdist/series | _md5sum) if grep -q "^$magic" .ptxdist/series; then diff --git a/scripts/lib/ptxd_make_world_clean.sh b/scripts/lib/ptxd_make_world_clean.sh index ce7907161..36e7711e5 100644 --- a/scripts/lib/ptxd_make_world_clean.sh +++ b/scripts/lib/ptxd_make_world_clean.sh @@ -15,7 +15,7 @@ ptxd_make_world_clean() { if [ -f "${pkg_xpkg_map}" ]; then echo "Deleting ipks:" - for name in $(cat "${pkg_xpkg_map}" 2>/dev/null); do + for name in $(< "${pkg_xpkg_map}" 2>/dev/null); do ls "${ptx_pkg_dir}/${name}"_*.ipk rm -f "${ptx_pkg_dir}/${name}"_*.ipk done @@ -23,7 +23,7 @@ ptxd_make_world_clean() { fi if [ -n "$(ls "${ptx_state_dir}/${pkg_label}".* 2> /dev/null)" ]; then echo "Deleting stage files:" - for name in $(cat "${pkg_xpkg_map}" 2>/dev/null); do + for name in $(< "${pkg_xpkg_map}" 2>/dev/null); do ls "${ptx_state_dir}/${name}".* rm -f "${ptx_state_dir}/${name}".* done diff --git a/scripts/lib/ptxd_make_xpkg_common.sh b/scripts/lib/ptxd_make_xpkg_common.sh index 279348f55..e34e73be8 100644 --- a/scripts/lib/ptxd_make_xpkg_common.sh +++ b/scripts/lib/ptxd_make_xpkg_common.sh @@ -45,7 +45,7 @@ ptxd_do_xpkg_map() { else set -- "${@/#/${ptx_state_dir}/}" fi - ptxd_reply=( $(cat "${@/%/.xpkg.map}" 2>/dev/null) ) + ptxd_reply=( $(< "${@/%/.xpkg.map}" 2>/dev/null) ) [ ${#ptxd_reply[@]} -ne 0 ] } diff --git a/scripts/lib/ptxd_make_xpkg_finish.sh b/scripts/lib/ptxd_make_xpkg_finish.sh index 255a66fa1..e56be8932 100644 --- a/scripts/lib/ptxd_make_xpkg_finish.sh +++ b/scripts/lib/ptxd_make_xpkg_finish.sh @@ -50,7 +50,7 @@ ptxd_make_xpkg_finish() { ${PTXDIST_LOG_PROMPT}warning: more than one ipkg per package detected: package: '${pkg_pkg}' -ipkg: '${pkg_xpkg}' and '$(cat "${pkg_xpkg_map}")' +ipkg: '${pkg_xpkg}' and '$(< "${pkg_xpkg_map}")' EOF @@ -74,11 +74,11 @@ EOF # # add pre-/postinst runs to the command list # make sure we replace in preinst first - # + # ( - cat "${pkg_xpkg_cmds}" | grep ptxd_install_script_replace + grep ptxd_install_script_replace < "${pkg_xpkg_cmds}" echo "ptxd_install_run preinst" - cat "${pkg_xpkg_cmds}" | grep -v ptxd_install_script_replace + grep -v ptxd_install_script_replace < "${pkg_xpkg_cmds}" echo "ptxd_install_run postinst" ) > "${pkg_xpkg_cmds}.tmp" mv "${pkg_xpkg_cmds}.tmp" "${pkg_xpkg_cmds}" |