Commit 04e27229 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

shell scripts for collecting translation files from all lab module...

shell scripts for collecting translation files from all lab module subdirectorys and to copy them back
parent 8a1dcc18
#!/bin/bash
#
# find and copy new or changed translation files from collect dir to origin location
# use after collect_translation.sh
COLLECT_DIR=translations
SLASH_REPLACE=_._
SCRIPT=$(readlink -f "$0")
DIR=$(dirname "$SCRIPT")
OLDDIR=`pwd`
if [ ! -d $DIR/$COLLECT_DIR ]; then
echo "no dir $DIR/$COLLECT_DIR found"
exit
fi
cd $DIR/$COLLECT_DIR
for propfile in *; do
fileloc=$DIR/${propfile//_._/\/}
#echo $fileloc
if [ ! -e $fileloc ]; then
echo -e "[new file] $propfile \ncopying to $fileloc\n---"
cp $propfile $fileloc
elif ! diff -q $propfile $fileloc > /dev/null; then
echo -e "[changed file] $propfile \ncopying to $fileloc\n---"
cp $propfile $fileloc
fi
done
cd $OLDDIR
base @ 37c8fa6f
Subproject commit a1ccbbeadd6dcca71651bf6cd5e7ea05520d357e
Subproject commit 37c8fa6fa7b13a445b8eb76bb75eb9656c10da09
#!/bin/bash
#
# collect all translation files in one dir
#
# preparation: (https://projects.gwdg.de/projects/textgrid-laboratory?jump=welcome)
#
# git clone --recursive git://git.projects.gwdg.de/textgrid-laboratory.git
# cd textgrid-laboratory
# git checkout develop
# git submodule update --remote
PROPFILE_MATCH="bundle*.properties plugin*.properties messages*.properties"
COLLECT_DIR=translations
SLASH_REPLACE=_._
SCRIPT=$(readlink -f "$0")
DIR=$(dirname "$SCRIPT")
OLDDIR=`pwd`
cd $DIR
if [ ! -d $COLLECT_DIR ]; then
echo "creating dir $COLLECT_DIR"
mkdir $COLLECT_DIR
fi
for prm in $PROPFILE_MATCH; do
echo "collecting with pattern ${prm}"
propfiles=`find . -name $prm`
for propfile in $propfiles; do
if [[ $propfile == *$SLASH_REPLACE* ]]; then
echo "origin $propfile contains replacement pattern in path, you should change the variable SLASH_REPLACE"
else
newname=${propfile:2}
newname=${newname//\//$SLASH_REPLACE}
cp $propfile $COLLECT_DIR/$newname &> /dev/null
fi
done
done
cd $OLDDIR
echo "all translation files collected in directory $DIR/$COLLECT_DIR"
core @ 7cc0aee7
Subproject commit 978195650a7517ccb1719306df71ad8ae88365d3
Subproject commit 7cc0aee78c2119de6e2dd0408942892b363c7b41
linkeditor @ 4c378348
Subproject commit 586a582cb2d5e2ce347d0b9f50e0eb52b1d9ed6b
Subproject commit 4c37834879bd8890385e13fd7b847871a724033d
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment