[TASK] Ensure build directory is clean of unwanted files 20/42120/2
authorXavier Perseguers <xavier@typo3.org>
Wed, 29 Jul 2015 20:25:00 +0000 (22:25 +0200)
committerXavier Perseguers <xavier@typo3.org>
Wed, 29 Jul 2015 20:25:59 +0000 (22:25 +0200)
Change-Id: Id4a8de2bb16c43c02028d9f867dc182062bd8176
Reviewed-on: http://review.typo3.org/42120
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
typo3/files/scripts/bin/build-language-pack
typo3/files/scripts/bin/build-sysext-language-pack

index e98061f..9b90c6c 100755 (executable)
@@ -26,6 +26,7 @@ for EXTNAME in $EXTENSIONS; do
 
        LANGUAGE_PACK_PATH=${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}/${EXTNAME}-l10n
        BUILD_EXT_PATH=${TER_L10N_PATH}/.$EXTNAME
+       rm -rf ${BUILD_EXT_PATH}
        mkdir -p $LANGUAGE_PACK_PATH
        mkdir -p $STATE_DIR/$EXT_PREFIX.$EXTNAME
 
@@ -86,7 +87,7 @@ for EXTNAME in $EXTENSIONS; do
                        mkdir -p ${BUILD_PATH}
                        cp -r $ORIG_LANG/* ${BUILD_PATH}
                        pushd ${BUILD_PATH} >/dev/null
-                       for XLF in $(find . -type f | cut -b3-); do
+                       for XLF in $(find . -type f -name \*.xlf | cut -b3-); do
                                DIR=$(dirname $XLF)
                                FILE=$(basename $XLF)
                                mv $XLF $DIR/$LANG.$FILE
index 6097afe..df57339 100755 (executable)
@@ -25,6 +25,7 @@ for EXTNAME in $EXTENSIONS; do
 
        LANGUAGE_PACK_PATH=${TER_L10N_PATH}/${EXTNAME:0:1}/${EXTNAME:1:1}/${EXTNAME}-l10n
        BUILD_EXT_PATH=${TER_L10N_PATH}/.$EXTNAME
+       rm -rf ${BUILD_EXT_PATH}
        mkdir -p $LANGUAGE_PACK_PATH
        mkdir -p $STATE_DIR/$EXT_PREFIX.$EXTNAME
 
@@ -103,7 +104,7 @@ for EXTNAME in $EXTENSIONS; do
                                mkdir -p ${BUILD_PATH}
                                cp -r $ORIG_LANG/* ${BUILD_PATH}
                                pushd ${BUILD_PATH} >/dev/null
-                               for XLF in $(find . -type f | cut -b3-); do
+                               for XLF in $(find . -type f -name \*.xlf | cut -b3-); do
                                        MAPPING=${POOTLE_PO}/${EXT_PREFIX}.${EXTNAME}/.typo3/TYPO3${VERSION}.filemapping
                                        if [ ! -f "${MAPPING}" ]; then
                                                continue