diff --git a/init-po-files b/init-po-files index 756943a..51cefc1 100755 --- a/init-po-files +++ b/init-po-files @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -source `dirname $0`/ths-variables +source "`dirname $0`/ths-variables" source $THS if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then @@ -29,10 +29,12 @@ else messages="$potrunk" pot="$pottrunk" fi + +wdir="`pwd`" cd $pot for dir in `ls`; do - cd $dir - podir="../../$messages/$dir" + cd "$dir" + podir="$wdir/$messages/$dir" if [ ! -e "$podir" ]; then mkdir "$podir" svn add "$podir" diff --git a/poupdate b/poupdate index c7b4b38..a6fdade 100755 --- a/poupdate +++ b/poupdate @@ -101,17 +101,17 @@ fi ## MAIN LOOP for updfile in $newtrans do -if [ `cd $tpl_tree; find ${updfile}t 2> /dev/null | wc -l` -gt 1 ]; then +if [ `cd "$tpl_tree"; find ${updfile}t 2> /dev/null | wc -l` -gt 1 ]; then if [ "$option_verbose" = "Y" ]; then echo - echo "Strange, there is more than one template for `basename $updfile`," + echo "Strange, there is more than one template for `basename "$updfile"`," echo "cannot determine the right one," echo "SKIPPING..." fi continue fi -if [ `cd $tpl_tree; find ${updfile} 2> /dev/null | wc -l` -gt 1 ]; then +if [ `cd "$tpl_tree"; find ${updfile} 2> /dev/null | wc -l` -gt 1 ]; then if [ "$option_verbose" = "Y" ]; then echo echo "Strange, there is more than one version of translation `basename $updfile`," @@ -126,7 +126,7 @@ fi if [ `cd $tpl_tree; find ${updfile}t 2> /dev/null | wc -l` -lt 1 ]; then if [ "$option_verbose" = "Y" ]; then echo - echo "File `basename $updfile` does not belong to this translation project," + echo "File `basename "$updfile"` does not belong to this translation project," echo "SKIPPING..." find ${updfile}t -print fi @@ -135,20 +135,20 @@ if [ `cd $tpl_tree; find ${updfile}t 2> /dev/null | wc -l` -lt 1 ]; then fi -if [ `cd $tra_tree; find ${updfile} 2> /dev/null | wc -l` -lt 1 ]; then +if [ `cd "$tra_tree"; find ${updfile} 2> /dev/null | wc -l` -lt 1 ]; then echo echo "File `basename $updfile` is completely newly translated," echo "COPYING it to the appropriate place..." #finding the appropriate - tplfile=`cd $tpl_tree; find ${updfile}t` - secdir=`dirname $tplfile` - cp $upd_dir/$updfile $tra_tree/$secdir/$updfile + tplfile=`cd "$tpl_tree"; find ${updfile}t` + secdir=`dirname "$tplfile"` + cp "$upd_dir/$updfile" "$tra_tree/$secdir/$updfile" fi # perform msgmerge and other actions - trafile=`cd $tra_tree; find $updfile` - tplfile=`cd $tpl_tree; find ${updfile}t` - mv $tra_tree/$trafile $tra_tree/${trafile}.old +trafile=`cd "$tra_tree"; find "$updfile"` +tplfile=`cd "$tpl_tree"; find "${updfile}t"` +mv "$tra_tree/$trafile" "$tra_tree/${trafile}.old" if [ ! "$option_new_as_secondary" = "Y" ]; then if [ "$option_verbose" = "Y" ]; then