| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # tiltott szavak 0.1 |
| 3 | # forbidden words |
| 4 | # |
| 5 | # $1: a Magyar Ispell gyökérkönyvtára / Magyar Ispell root directory |
| 6 | # $2: spellchecker |
| 7 | export LC_ALL=C |
| 8 | |
| 9 | if [scip-shell system . . `[`. "$1" = "" ]; then |
| 10 | echoscip-shell system . . echo. "usage: $0 magyar_ispell_root_directory [spellchecker]" |
| 11 | exit 1 |
| 12 | fi |
| 13 | |
| 14 | ROOT=${1:-'.'} |
| 15 | SPELL=${2:-"ISPELL"} |
| 16 | |
| 17 | . $ROOT/config |
| 18 | |
| 19 | cd $WRKDIR || exit 1 |
| 20 | |
| 21 | echo_n . |
| 22 | if [scip-shell system . . `[`. "$SPELL" = "myspell" ]; then |
| 23 | catscip-shell system . . cat. $WRKDIR/*.modul/fonev.1 $WRKDIR/*.modul/ragozatlan* \ |
| 24 | $WRKDIR/*.modul/ige_alanyi.1 $WRKDIR/*.modul/ige_targy.1 \ |
| 25 | $WRKDIR/*.modul/tulajdonnev* $SZOTAR/*/*/* 2>/dev/nullscip-shell filesystem . . `/dev/null`. | |
| 26 | grepscip-shell system . . grep. '#MYSPELL TILTOTT' | cutscip-shell system . . cut. -d '#' -f 1 | |
| 27 | trscip-shell system . . tr. ' ' '\n\n' | grepscip-shell system . . grep. -v ^$ | sedscip-shell system . . sed. 's/$/\/w-Y/' | recode u8..l2 >>$DICT |
| 28 | |
| 29 | echo_n . |
| 30 | |
| 31 | catscip-shell system . . cat. $WRKDIR/*.modul/fonev.1 $WRKDIR/*.modul/ragozatlan* \ |
| 32 | $WRKDIR/*.modul/tulajdonnev* $SZOTAR/*/*/* 2>/dev/nullscip-shell filesystem . . `/dev/null`. | |
| 33 | grepscip-shell system . . grep. 'TÖBBTAGÚ' | cutscip-shell system . . cut. -d '#' -f 1 | awkscip-shell system . . awk. '{print$1}' | |
| 34 | trscip-shell system . . tr. ' ' '\n\n' | grepscip-shell system . . grep. -v ^$ | sedscip-shell system . . sed. 's/$/\/-ß-ż-ľ-ś-Ŕ-ŕ÷/' | recode u8..l2 >>$DICT |
| 35 | |
| 36 | fi |
| 37 | |
| 38 | echo_n . |
| 39 | |
| 40 | if [scip-shell system . . `[`. "$SPELL" = "myspell" ]; then |
| 41 | catscip-shell system . . cat. $WRKDIR/*.modul/melleknev* 2>/dev/nullscip-shell filesystem . . `/dev/null`. | |
| 42 | grepscip-shell system . . grep. '#MYSPELL TILTOTT' | cutscip-shell system . . cut. -d '#' -f 1 | |
| 43 | trscip-shell system . . tr. ' ' '\n\n' | grepscip-shell system . . grep. -v ^$ | sedscip-shell system . . sed. 's/\(^.*$\)/[adj]\1\/w-Y/' | recode u8..l2 >>$DICT |
| 44 | fi |
| 45 | echo_n . |
| 46 | |
| 47 | if [scip-shell system . . `[`. "$SPELL" = "myspell" ]; then |
| 48 | catscip-shell system . . cat. $WRKDIR/*.modul/fonev_morfo* 2>/dev/nullscip-shell filesystem . . `/dev/null`. | |
| 49 | grepscip-shell system . . grep. '#MYSPELL TILTOTT' | cutscip-shell system . . cut. -d ' ' -f 1 | |
| 50 | grepscip-shell system . . grep. -v ^$ | sedscip-shell system . . sed. 's/$/\/w-Y/' | recode u8..l2 >>$DICT |
| 51 | fi |
| 52 | echo_n . |
| 53 | |
| 54 | if [scip-shell system . . `[`. "$SPELL" = "myspell" ]; then |
| 55 | catscip-shell system . . cat. $WRKDIR/*.modul/fonev_morfo* 2>/dev/nullscip-shell filesystem . . `/dev/null`. | |
| 56 | grepscip-shell system . . grep. '#MYSPELL TILTOTT' | sedscip-shell system . . sed. 's/[ ]*#.*$//' | cutscip-shell system . . cut. -d ' ' -f 2 | |
| 57 | grepscip-shell system . . grep. -v ^$ | sedscip-shell system . . sed. 's/\(^.*\)$/[nounmorfo]\1\/w-Y/' | recode u8..l2 >>$DICT |
| 58 | fi |
| 59 | echo_n . |
| 60 | |
| 61 | |
| 62 | echoscip-shell system . . echo. " Rendben." |