File: make_kdepackages.sh

package info (click to toggle)
kde4libs 4:4.14.2-5+deb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 82,428 kB
  • ctags: 99,415
  • sloc: cpp: 761,864; xml: 12,344; ansic: 6,295; java: 4,060; perl: 2,938; yacc: 2,507; python: 1,207; sh: 1,179; ruby: 337; lex: 278; makefile: 29
file content (14 lines) | stat: -rwxr-xr-x 812 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

rm kdepackages.h
curl "http://bugs.kde.org/xml.cgi?data=versiontable" > tmp_kdepackages_download
echo "// DO NOT EDIT - EDIT bugs/Maintainers instead" >  kdepackages.h
echo "const char * const packages[] = {" >> kdepackages.h
cat tmp_kdepackages_download | egrep "<product|<component" | grep -v "</product>" | \
    sed -e "s,<product name=\"\([^\"]*\)\">,product=\"\1\"; component=\"general\",; \
    s#<component>\([^<]*\)</component>#component=\"\1\"#"  > tmp_kdepackages_download2
(while read i; do eval $i; echo "\"$product/$component\","; done) < tmp_kdepackages_download2 | \
    sed -e "s,/general\",/00general\"," | LC_ALL=C sort -u | \
    grep -v 'valgrind/' | sed -e "s,/00general\",\"," >> kdepackages.h
echo "0 };" >>  kdepackages.h
rm tmp_kdepackages_download2 tmp_kdepackages_download