xref: /aoo4110/extras/l10n/source/prepare_l10n.sh (revision b1cdbd2c)
1*b1cdbd2cSJim Jagielski#!/bin/tcsh
2*b1cdbd2cSJim Jagielski
3*b1cdbd2cSJim Jagielskiforeach file ( $* )
4*b1cdbd2cSJim Jagielski    cat $file | grep -v "	en-US	" > $file.tmp
5*b1cdbd2cSJim Jagielski    set lang = `head -1 $file.tmp | cut -f 10`
6*b1cdbd2cSJim Jagielski    if ( $lang == "" ) then
7*b1cdbd2cSJim Jagielski        echo "Lang = $lang in $file ... ???";
8*b1cdbd2cSJim Jagielski        exit(-1)
9*b1cdbd2cSJim Jagielski    else if ( $lang == "#" ) then
10*b1cdbd2cSJim Jagielski        echo "File $file contains already header .. pls remove or fix me!"
11*b1cdbd2cSJim Jagielski        exit(-1)
12*b1cdbd2cSJim Jagielski    else
13*b1cdbd2cSJim Jagielski        echo "Processing language $lang"
14*b1cdbd2cSJim Jagielski        cat header $file.tmp > $file.tmp.tmp
15*b1cdbd2cSJim Jagielski        mkdir $lang
16*b1cdbd2cSJim Jagielski        cp $file.tmp.tmp $lang/localize.sdf
17*b1cdbd2cSJim Jagielski    endif
18*b1cdbd2cSJim Jagielski    rm $file.tmp $file.tmp.tmp
19*b1cdbd2cSJim Jagielskiend
20