Blokovani pres konstantu
[mirrors/Programs.git] / bash / pkgbuild-parser.sh
1 #!/bin/bash
2 echo '<?php'
3 . PKGBUILD
4
5 get_function() {
6 export -f "$1" || exit 1;
7 bash -c 'env' | tr '\n' '\0' | sed 's/.*'"$1"'=() {\(.*\)}.*/\1/g' | tr '\0' '\n'
8 }
9
10 echo '$packages=array('
11 echo "${pkgname[*]}" | egrep -o '[a-z0-9-]'* | while read pkg; do echo "'$pkg', "; done
12 echo ');'
13
14 echo "${pkgname[*]}" | egrep -o '[a-z0-9-]'* | while read pkg; do
15 get_function package_"$pkg" | while read i; do eval "$i" &>/dev/null; echo '$pkgdescs['"'$pkg']='$pkgdesc';"; done | tail -n1
16 done;
17
This page took 0.317187 seconds and 4 git commands to generate.