Revisió 3e290f5a
Afegit per Jorge L. Florit fa casi 11 anys
scripts/extra-packages.script | ||
---|---|---|
#!/bin/bash
|
||
#!/bin/sh
|
||
|
||
PREPOST="$1"
|
||
shift
|
||
... | ... | |
shift
|
||
shift
|
||
EXTRA_PACKS="$@"
|
||
FILE="build/$TBUILD/.config"
|
||
[ -z "$TBUILD" ] || [ ! -d "build/$TBUILD" ] || [ -f "$FILE" ] && exit 1
|
||
FILE="build/${TBUILD}/.config"
|
||
|
||
[ -z "$TBUILD" ] || [ ! -d "build/$TBUILD" ] || [ ! -f "$FILE" ] && exit 1
|
||
|
||
for i in $EXTRA_PACKS; do
|
||
[ "$PREPOST" = "PRE_BUILD" ] && AUX=$(grep $i $FILE) && sed -i -e s/"$AUX"/"CONFIG_PACKAGE_$i=y"/g $FILE
|
||
[ "$PREPOST" = "POST_BUILD" ] && AUX=$(grep $i $FILE) && sed -i -e s/"$AUX"/"# CONFIG_PACKAGE_$i is not set"/g $FILE
|
||
AUX="$(grep $i $FILE)"
|
||
[ ! -z "$AUX" ] && {
|
||
[ "$PREPOST" = "PRE_BUILD" ] && echo "- (PRE_BUILD) Adding extra package: $i" >&2 && sed -i -e s/"${AUX}"/"CONFIG_PACKAGE_$i=y"/g $FILE
|
||
[ "$PREPOST" = "POST_BUILD" ] && echo "- (POST_BUILD) Removing extra package: $1" >&2 && sed -i -e s/"${AUX}"/"# CONFIG_PACKAGE_$i is not set"/g $FILE
|
||
}
|
||
done
|
||
|
També disponible a: Unified diff
Fix extra-packages.script