#!/bin/bash generate_po() { ORIG=`pwd` TEMPDIR="/tmp/gosa-locale" TRUE=`which true` echo echo "Creating temporary directory..." [ -d $TEMPDIR ] && rm -rf $TEMPDIR mkdir $TEMPDIR echo "Creating copy of GOsa..." tar c . | tar x -C $TEMPDIR echo "Converting .tpl files..." pushd . &> /dev/null cd $TEMPDIR for template in $(find . -name '*.tpl'); do echo "* converting .tpl files: $(basename $template)" sed -e 's/{t}/!g' $template > $template.new mv $template.new $template done for template in $(find . -name '*.xml'); do echo "* converting .xml files: $(basename $template)" sed -e 's/