fix handling of spaces in names
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Mon, 5 Mar 2012 10:23:45 +0000 (11:23 +0100)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Mon, 5 Mar 2012 10:23:45 +0000 (11:23 +0100)
scripts/save-locale-pack

index efca719..87a2ed3 100755 (executable)
@@ -14,13 +14,13 @@ LNG=$2
 load_lang()
 {
     L=$1
 load_lang()
 {
     L=$1
-    for pofile in $LOCALIZED/$L/*.po; do
-       app=`basename $pofile .po`
+    for pofile in "$LOCALIZED/$L/"*.po; do
+       app=`basename "$pofile" .po`
        echo $app
        if [ "$app" = "wolnelektury" ]; then
        echo $app
        if [ "$app" = "wolnelektury" ]; then
-           cp -v $pofile $ROOT/wolnelektury/locale/$L/LC_MESSAGES/django.po
+           cp -v "$pofile" "$ROOT/wolnelektury/locale/$L/LC_MESSAGES/django.po"
        else
        else
-           cp -v $pofile $ROOT/apps/$app/locale/$L/LC_MESSAGES/django.po
+           cp -v "$pofile" "$ROOT/apps/$app/locale/$L/LC_MESSAGES/django.po"
        fi
     done
 }
        fi
     done
 }
@@ -34,9 +34,9 @@ else
     done
 fi
 
     done
 fi
 
-${0}-json.py $LOCALIZED/infopages.json $LNG
-cp -v $LOCALIZED/infopages.json ${ROOT}/apps/infopages/fixtures/infopages.json
-cp -v $LOCALIZED/locale.js.txt ${ROOT}/wolnelektury/static/js/locale.js
+${0}-json.py "$LOCALIZED/infopages.json" $LNG
+cp -v "$LOCALIZED/infopages.json" ${ROOT}/apps/infopages/fixtures/infopages.json
+cp -v "$LOCALIZED/locale.js.txt" ${ROOT}/wolnelektury/static/js/locale.js
 
 for i in $ROOT/apps/*; do 
     cd $i;
 
 for i in $ROOT/apps/*; do 
     cd $i;