Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecompress: fix "Argument list too long" for sed (bug 727522) #563

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/ecompress
Expand Up @@ -38,9 +38,10 @@ while [[ $# -gt 0 ]] ; do
if [[ ${#skip_files[@]} -gt 0 && -s ${T}/.ecompress_had_precompressed ]]; then
sed_args=()
for f in "${skip_files[@]}"; do
sed_args+=(-e "s|^${f}\$||")
sed_args+=("s|^${f}\$||;")
done
sed "${sed_args[@]}" -e '/^$/d' -i "${T}/.ecompress_had_precompressed" || die
sed_args+=('/^$/d')
sed -f - -i "${T}/.ecompress_had_precompressed" <<< "${sed_args[@]}" || die
fi

exit 0
Expand Down