diff --git a/script/extract_i18n.sh b/script/extract_i18n.sh index 4357684f5a..f374eb9561 100755 --- a/script/extract_i18n.sh +++ b/script/extract_i18n.sh @@ -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/* diff --git a/script/revert-vagrant-dev-env.sh b/script/revert-vagrant-dev-env.sh index 9d447238a5..922b329d17 100644 --- a/script/revert-vagrant-dev-env.sh +++ b/script/revert-vagrant-dev-env.sh @@ -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)