Projecte

General

Perfil

Baixar (565 Bytes) Estadístiques
| Branca: | Etiqueta: | Revisió:
3e290f5a Jorge L. Florit
#!/bin/sh
ee446b02 Jorge L. Florit
PREPOST="$1"
shift
TBUILD="$1"
shift
shift
EXTRA_PACKS="$@"
3e290f5a Jorge L. Florit
FILE="build/${TBUILD}/.config"

[ -z "$TBUILD" ] || [ ! -d "build/$TBUILD" ] || [ ! -f "$FILE" ] && exit 1
ee446b02 Jorge L. Florit
for i in $EXTRA_PACKS; do
0402c5df Pau Escrich
PKG="CONFIG_PACKAGE_$i"
AUX="$(grep $PKG $FILE | tr -d '\n')"
[ -n "$AUX" ] && {
0bbc22a4 Jorge L. Florit
[ "$PREPOST" = "PRE_BUILD" ] && echo "- Adding extra package: $i" >&2 && sed -i -e s/"${AUX}"/"CONFIG_PACKAGE_$i=y"/g $FILE
0402c5df Pau Escrich
[ "$PREPOST" = "POST_BUILD" ] && echo "- Removing extra package: $i" >&2 && sed -i -e s/"${AUX}"/"# CONFIG_PACKAGE_$i is not set"/g $FILE
3e290f5a Jorge L. Florit
}
ee446b02 Jorge L. Florit
done