Browse Source

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

master
Andrius Štikonas 12 years ago
parent
commit
24043679a2
  1. 26
      init-po-files

26
init-po-files

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

Loading…
Cancel
Save