fixes bug 311099 "Make sure to strip CRs from remove instructions" r=chase

This commit is contained in:
darin%meer.net 2005-10-04 21:07:13 +00:00
parent db5f5665a5
commit 453f29fe05

View File

@ -66,7 +66,8 @@ append_remove_instructions() {
files=($(cat "$listfile" | tr " " "|"))
num_files=${#files[*]}
for ((i=0; $i<$num_files; i=$i+1)); do
f=$(echo ${files[$i]} | tr "|" " " | sed 's/^ *\(.*\) *$/\1/')
# Trim whitespace (including trailing carriage returns)
f=$(echo ${files[$i]} | tr "|" " " | sed 's/^ *\(.*\) *$/\1/' | tr -d '\r')
# Exclude any blank lines or any lines ending with a slash, which indicate
# directories. The updater doesn't know how to remove entire directories.
if [ -n "$f" ]; then