diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-14 15:01:37 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-14 15:01:37 (EDT) |
commit | e896f1bd0de35a4c2893f8d7b68028ae6f1c7d23 (patch) | |
tree | 900ba669d4791bd0b22ba5b4e6fcabb0f074c005 /src/index.sh | |
parent | 4d4570f81329f3e99cf0ce1b8ed61d5b9cb39026 (diff) |
Make redirected FDs explicit
Diffstat (limited to 'src/index.sh')
-rw-r--r-- | src/index.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/index.sh b/src/index.sh index 7322798..ac070bc 100644 --- a/src/index.sh +++ b/src/index.sh @@ -65,18 +65,18 @@ feed_add_package() mkdir -p -- "${feed_hash_idx}/info" "${TAR}" -xzOf "${base_dir}/${file}" 'control.tar.gz' | \ "${TAR}" -xzO './control' \ - >"${feed_hash_idx}/info/${pkg}.control" + 1>"${feed_hash_idx}/info/${pkg}.control" printf 'Filename: %s\nSize: %s\nMD5sum: %s\nSHA256sum: %s\n\n' \ "../../../../../../${file}" "${size}" \ "$("${MD5SUM}" "${base_dir}/${file}" | sed 's/ .*$//')" \ "$("${SHA256SUM}" "${base_dir}/${file}" | sed 's/ .*$//')" \ - >>"${feed_hash_idx}/info/${pkg}.control" + 1>>"${feed_hash_idx}/info/${pkg}.control" # Mark feed index fragment as outdated. old_dir="${base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}" old_dir="${old_dir}/${sect}" mkdir -p -- "${old_dir}" - >"${old_dir}/${pkg_hash}" + 1>"${old_dir}/${pkg_hash}" return 0 } @@ -109,7 +109,7 @@ feed_remove_package() old_dir="${base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}" old_dir="${old_dir}/${sect}" mkdir -p -- "${old_dir}" - >"${old_dir}/${pkg_hash}" + 1>"${old_dir}/${pkg_hash}" return 0 } @@ -174,7 +174,7 @@ update_feeds() # Ensure there are still packages here. if [ -d "${idx}/info" ]; then cat -- "${idx}/info/"*.control \ - >"${idx}/Packages" + 1>"${idx}/Packages" else rm -f -- "${idx}/Packages" rmdir -- "${idx}" @@ -184,16 +184,16 @@ update_feeds() # Ensure there are still packages here. if ! try_rmdir "${sect}/.db"; then cat -- "${sect}/.db/"*/Packages \ - >"${sect}/Packages~" + 1>"${sect}/Packages~" mv -- "${sect}/Packages~" \ "${sect}/Packages" if ${conf_gzip}; then "${GZIP}" -9c -- \ "${sect}/Packages" \ - >"${sect}/Packages.gz" + 1>"${sect}/Packages.gz" fi feed_sign "${sect}/Packages" - printf '%s\n' "${manifest_entry}" >&3 + printf '%s\n' "${manifest_entry}" 1>&3 else rm -f -- "${sect}/Packages" \ "${sect}/Packages.gz" |