From c53e3264f560d9e71145ffe94022175b8018277a Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 2 Feb 2016 05:37:33 +0100 Subject: add model: Create the language files, if not available --- add_extbase_model.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/add_extbase_model.sh b/add_extbase_model.sh index 4dc9da1..0a849f5 100755 --- a/add_extbase_model.sh +++ b/add_extbase_model.sh @@ -93,12 +93,11 @@ cat >> ext_tables.php << EOL EOL -sed -i "s/.*<\/body>/\t\t\t\n\t\t\t\t${model}<\/source>\n\t\t\t<\/trans-unit>\n&/" \ - Resources/Private/Language/locallang.xlf \ - Resources/Private/Language/locallang_db.xlf - date=`date "+%Y-%m-%dT%H:%I:%SZ"` -cat > ${locallang_csh_file} << EOL +for f in Resources/Private/Language/locallang.xlf Resources/Private/Language/locallang_db.xlf ${locallang_csh_file} +do + if [ ! -e $f ]; then + cat > $f << EOL @@ -108,6 +107,12 @@ cat > ${locallang_csh_file} << EOL EOL + fi +done + +sed -i "s/.*<\/body>/\t\t\t\n\t\t\t\t${model}<\/source>\n\t\t\t<\/trans-unit>\n&/" \ + Resources/Private/Language/locallang.xlf \ + Resources/Private/Language/locallang_db.xlf cat > ${tca_file} << EOL -- cgit