Index: source/tools/i18n/maintenanceTasks.sh =================================================================== --- source/tools/i18n/maintenanceTasks.sh +++ source/tools/i18n/maintenanceTasks.sh @@ -1,36 +1,11 @@ -#!/bin/bash +#!/bin/sh -# Regenerates the POT files and uploads them to Transifex, downloads the latest -# translations from Transifex, and commits the updated POT and PO files. +# Regenerates the POT files, downloads the latest translations from Transifex, +# and prepares the commit of the updated POT and PO files. SCRIPT_PATH="`dirname \"$0\"`" -# VCS Config ################################################################## - -VCS="svn" -VCS_UPDATE="svn update" -VCS_REVERT="svn revert %s@" -VCS_ADD="svn add %s" -VCS_COMMIT_AND_PUSH="svn commit -m '[i18n] Updated POT and PO files.'" -git rev-parse &> /dev/null -if [[ "$?" = "0" ]]; then - VCS="git" - VCS_UPDATE="git pull --rebase origin master" - VCS_REVERT="git checkout -- %s" - VCS_ADD="git add %s" - VCS_COMMIT_AND_PUSH="git commit -am '[i18n] Updated POT and PO files.' && - git pull --rebase origin master && - git push origin master" -fi - - -# Source Update ############################################################### - -echo ":: Updating sources…" -${VCS_UPDATE} - - # POT Generation ############################################################## echo ":: Regenerating the translation templates…" @@ -54,10 +29,10 @@ echo ":: Reverting unnecessary changes…" for FILE_PATH in $(find "${SCRIPT_PATH}/../../../binaries/data" -name "*.pot" -o -name "*.po") do - if [[ ! -n "$(poediff -c ${VCS} -rHEAD -qs "${FILE_PATH}")" ]]; then - $(printf "${VCS_REVERT}" "${FILE_PATH}") + if [ -z "$(poediff -c svn -qs "${FILE_PATH}")" ]; then + svn revert "${FILE_PATH}" else - $(printf "${VCS_ADD}" ${FILE_PATH}) &> /dev/null + svn add "${FILE_PATH}" 2> /dev/null fi done