Skip to content

Commit

Permalink
fixmetadir: Use while read loop instead of for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Ruester authored and mariux committed Jan 11, 2016
1 parent b48119d commit 776312d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/compat-fixmetadir.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@ function fix_deprecated_FILES_file() {
local pkg
local cf

for ff in $(find ${dir} \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name FILES \
-printf "%P\n") ; do

while IFS= read -r -d '' ff
do
pkg=${ff%/FILES}
cf="${pkg}/CONTENT"

Expand All @@ -47,7 +42,12 @@ function fix_deprecated_FILES_file() {
mv "${dir}/${cf}.$$" "${dir}/${cf}"
fi
mv "${dir}/${ff}" "${dir}/${ff}.deprecated"
done
done < <(find "${dir}" \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name FILES \
-printf "%P\n")
}

############################################################################
Expand Down

0 comments on commit 776312d

Please sign in to comment.