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
Родитель 6ce842e5d5
Коммит e5da4e7fe2
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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