Merge pull request #56 from nibalizer/for-loop

Refactor loop to use for-do instead of while-read.
This commit is contained in:
Ashley Penney 2013-08-08 12:21:29 -07:00
commit 0046fe45f8

View file

@ -112,9 +112,14 @@ else
fi
# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir
find fragments/ -type f -follow | LANG=C sort ${SORTARG} | while read -r fragfile; do
cat "$fragfile" >> "fragments.concat"
IFS_BACKUP=$IFS
IFS='
'
for fragfile in `find fragments/ -type f -follow | LANG=C sort ${SORTARG}`
do
cat $fragfile >> concat.fragment
done
IFS=$IFS_BACKUP
if [ x${TEST} = "x" ]; then
# This is a real run, copy the file to outfile