Changeset 8520

Show
Ignore:
Timestamp:
04/06/12 11:44:46 (15 months ago)
Author:
jow
Message:

build/i18n-init.sh: add git support

Signed-off-by: Gabor Juhos <juhosg@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/build/i18n-init.sh

    r8519 r8520  
    22 
    33PATTERN=$1 
     4SCM= 
    45 
    5 [ -z "$PATTERN" ] && PATTERN='*.pot' 
     6[ -d .svn ] && SCM="svn" 
     7[ -d .git ] && SCM="git" 
     8 
     9[ -z "$SCM" ] && { 
     10    echo "Unsupported SCM tool" >&2 
     11    exit 1 
     12} 
     13 
     14[ -z "$PATTERN" ] && PATTERN="*.pot" 
    615 
    716for lang in $(cd po; echo ?? ??_??); do 
     
    918        if [ -f po/templates/$file -a ! -f "po/$lang/${file%.pot}.po" ]; then 
    1019            msginit --no-translator -l "$lang" -i "po/templates/$file" -o "po/$lang/${file%.pot}.po" 
    11             svn add "po/$lang/${file%.pot}.po" 
     20            $SCM add "po/$lang/${file%.pot}.po" 
    1221        fi 
    1322    done