File: get_ical_data.sh

package info (click to toggle)
webcit 8.14-dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,100 kB
  • sloc: ansic: 31,320; sh: 4,381; makefile: 340; xml: 90; sed: 9
file content (21 lines) | stat: -rwxr-xr-x 556 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
ICAL=/usr/local/ctdlsupport/include/libical/ical.h
if test -f /usr/include/libical/ical.h; then 
    ICAL=/usr/include/libical/ical.h
fi
(
printf '#include "webcit.h"\n\n\nIcalEnumMap icalproperty_kind_map[] = {\n'
cat $ICAL |\
sed 's;/\*.*\*/;;' |\
./get_ical_data.sed |\
sed -e 's;.*icalproperty_kind {\(.*\)} icalproperty_kind.*;\1,;' \
    -e 's;/\*.*\*/;;' \
    -e 's;/;\n/\n;g' \
    -e 's;,;,\n;g' \
    -e 's; *;;g' \
    -e 's;^t*;;g' \
    -e 's;\=0;;g'|\
sed -e 's;\(.*\),;{HKEY("\1"), \1},;'
printf '{"", 0, 0}\n};\n' 

)>ical_maps.c