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