Add quotes to prevent shell expansion in init-po-files script.

This commit is contained in:
Andrius Štikonas 2009-08-12 11:20:42 +03:00
parent c7ed490ce3
commit 24043679a2
1 changed files with 13 additions and 13 deletions

View File

@ -14,8 +14,8 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
source "`dirname $0`/ths-variables" source `dirname $0`/ths-variables
source "$THS" source $THS
if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
echo "Usage `basename $0` <messages-tree> <pot-tree>" echo "Usage `basename $0` <messages-tree> <pot-tree>"
@ -23,26 +23,26 @@ if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
fi fi
if [ $# -eq 2 ]; then if [ $# -eq 2 ]; then
messages=$1 messages="$1"
pot=$2 pot="$2"
else else
messages=$potrunk messages="$potrunk"
pot=$pottrunk pot="$pottrunk"
fi fi
cd $pot cd $pot
for dir in `ls`; do for dir in `ls`; do
cd $dir cd $dir
podir=../../$messages/$dir podir="../../$messages/$dir"
if [ ! -e $podir ]; then if [ ! -e "$podir" ]; then
mkdir $podir mkdir "$podir"
svn add $podir svn add "$podir"
fi fi
for file in `ls`; do for file in `ls`; do
po=`echo $file | sed s/.pot/.po/` po=`echo $file | sed s/.pot/.po/`
if [ ! -e $podir/$po ]; then if [ ! -e "$podir/$po" ]; then
echo -e $RED"$dir/$po"$ENDCOLOR echo -e $RED"$dir/$po"$ENDCOLOR
msginit -i $file -o $podir/$po --no-translator msginit -i "$file" -o "$podir/$po" --no-translator
svn add $podir/$po svn add "$podir/$po"
fi fi
done done
cd .. cd ..