File: makeEntitiesTable

package info (click to toggle)
gtkmathview 0.8.0-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,860 kB
  • ctags: 7,306
  • sloc: cpp: 53,699; xml: 12,660; sh: 8,979; makefile: 1,718; ansic: 1,149; perl: 88
file content (36 lines) | stat: -rwxr-xr-x 665 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh

ENTITIES=`cut -d ',' -f1,2`

echo "<?xml version=\"1.0\"?>"
echo "<!DOCTYPE entities-table SYSTEM \"entities-table.dtd\">"
echo

echo "<entities-table>"
for i in $ENTITIES
do
  NAME=`echo $i | cut -d ',' -f1`
  VALUE=`echo $i | cut -d ',' -f2 | tr -d 'xU'`
  VALUE1=`echo $VALUE | cut -d '-' -f1`
  VALUE2=`echo $VALUE | cut -s -d '-' -f2`
  VALUE3=`echo $VALUE | cut -s -d '-' -f3`
  echo -n "  <entity name=\""$NAME"\" value=\""

  if test $VALUE1
  then
    echo -n "&#x"$VALUE1";"
  fi

  if test $VALUE2
  then
    echo -n "&#x"$VALUE2";"
  fi

  if test $VALUE3
  then
    echo -n "&#x"$VALUE3";"
  fi

  echo "\"/>"
done
echo "</entities-table>"