TT#29620 Clean TAP test warning: For loops over find output are fragile. Use find -exec or a while read loop [SC2044]

Change-Id: I8bfab949c5fd9ef650cf65d90de39f45336b6f16
changes/81/21281/7
Alexander Lutay 8 years ago
parent dbd3007d3e
commit d392de47a4

@ -32,10 +32,10 @@ xgettext.pl \
$DIRS \
-P perl=tt,pm
for po in $(find lib/NGCP/Panel/I18N -name "*.po"); do
while IFS= read -r -d '' po ; do
echo; echo "Merging $po"; echo
msgmerge --no-fuzzy-matching --add-location=file --update $po $POT
done
msgmerge --no-fuzzy-matching --add-location=file --update "$po" "$POT"
done < <(find lib/NGCP/Panel/I18N -name "*.po" -print0)
echo; echo "Removing line numbers"; echo
sed -i -e '/#: /s!\(\(lib\|share\)\S*\):[0-9]*!\1!g' lib/NGCP/Panel/I18N/*

@ -1,10 +1,10 @@
#!/bin/bash
for i in $(find /usr/ -name "*.orig"); do
while IFS= read -r -d '' i ; do
f=${i%.orig};
if [ -L "$f" ]; then
echo "reverting $i to $f"
rm $f
mv $i $f
rm "$f"
mv "$i" "$f"
fi
done
done < <(find /usr/ -name "*.orig" -print0)

Loading…
Cancel
Save