forked from freifunk-franken/firmware
buildscript: support multiple patches on feeds
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de> Reviewed-by: Dominik Heidler <dominik@heidler.eu> Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
This commit is contained in:
parent
d9dbaf7d97
commit
6c98267ff8
20
buildscript
20
buildscript
|
@ -7,7 +7,7 @@ OPENWRTURL="git://git.openwrt.org/14.07/openwrt.git"
|
||||||
PACKAGEREV="de5e37ac5be3d44c335faa9652bf4ce15784f4ad"
|
PACKAGEREV="de5e37ac5be3d44c335faa9652bf4ce15784f4ad"
|
||||||
PACKAGEURL="https://github.com/openwrt/packages.git"
|
PACKAGEURL="https://github.com/openwrt/packages.git"
|
||||||
|
|
||||||
## Feed definition [0]: name aka directory [1]: url [2]: revision [3]: patches
|
## Feed definition [0]: name aka directory, [1]: url, [2]: revision, [3..n]: patches
|
||||||
|
|
||||||
#official openwrt packages
|
#official openwrt packages
|
||||||
OPENWRT=(openwrt
|
OPENWRT=(openwrt
|
||||||
|
@ -82,15 +82,23 @@ get_source() {
|
||||||
local NAME=${FEED[0]}
|
local NAME=${FEED[0]}
|
||||||
local URL=${FEED[1]}
|
local URL=${FEED[1]}
|
||||||
local REV=${FEED[2]}
|
local REV=${FEED[2]}
|
||||||
local PATCH=${FEED[3]}
|
|
||||||
|
|
||||||
checkout_git "$NAME" "$URL" "$REV"
|
checkout_git "$NAME" "$URL" "$REV"
|
||||||
|
|
||||||
# Patches for feeds could be stored in known directories like build_patches/$NAME/
|
# Patches for feeds could be stored in known directories like build_patches/$NAME/
|
||||||
# That way multiple patches for one feed could be supported
|
# That way multiple patches for one feed could be supported
|
||||||
if [ ! -z "$PATCH" ] ; then
|
count=3
|
||||||
echo "Patching $PATCH"
|
while [ "x${FEED[count]}" != "x" ]
|
||||||
git -C "$NAME" am --whitespace=nowarn "$PATCH"
|
do
|
||||||
fi
|
local PATCH=${FEED[count]}
|
||||||
|
if [ ! -z "$PATCH" ] ; then
|
||||||
|
echo "Patching $PATCH"
|
||||||
|
git -C "$NAME" am --whitespace=nowarn "$PATCH"
|
||||||
|
else
|
||||||
|
echo "Warning, $PATCH not found."
|
||||||
|
fi
|
||||||
|
count=$(( count + 1 ))
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
cd .. # packages
|
cd .. # packages
|
||||||
|
|
Loading…
Reference in New Issue