script error (using bash command)
Hi All,
I am trying to run the following script and getting some syntacs errors. Please help me because i am stack.
The script:
----------------
#!/bin/bash
PLAYSMS=$1
if [ -z "$PLAYSMS" ]; then
echo "Usage: $0 <playSMS installation path>"
exit 1
fi
CWD=$(pwd)
##Common strings
cd $PLAYSMS/plugin
touch language/messages.pot
touch language/index.html
xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot ../init.php
xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot ../index.php ##Themes,plugins and tools strings
find ../lib/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;cd $PLAYSMS/web/plugin
find ../inc/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;find . -type d -name "language" | grep -v "grep" | sed -e "s/\/[^\/]*$//" > /tmp/.lang_folders
find themes/common/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;for i in `cat /tmp/.lang_folders` ; do mkdir -p "$i/language" ; done
for i in `cat /tmp/.lang_folders` ; do rm -f "$i/language/messages.pot" ; done
for i in `cat /tmp/.lang_folders` ; do touch "$i/language/messages.pot" ; done
for i in `cat /tmp/.lang_folders` ; do
find $i -iname '*.php' -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o "$i/language/messages.pot" {} \; ;
touch "$i/language/index.html"
done
rm /tmp/.lang_folders
cd $CWD
exit 0
--------------------------------------------------------------------
The Error:
------------
find: missing argument to `-exec'
find: missing argument to `-exec'
1-update-pot-files.sh: line 20: syntax error near unexpected token `do'
1-update-pot-files.sh: line 20: `find themes/common/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;for i in `cat /tmp/.lang_folders` ; do mkdir -p "$i/language" ; done'
--------------------------------------------------------------------
Thanks,
Nimrod
|