forked from freifunk-franken/firmware
buildscript: allow feed without url
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de> Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
This commit is contained in:
parent
ae16b107a3
commit
b5e5caa741
38
buildscript
38
buildscript
|
@ -89,22 +89,24 @@ get_source() {
|
||||||
local URL=${FEED[1]}
|
local URL=${FEED[1]}
|
||||||
local REV=${FEED[2]}
|
local REV=${FEED[2]}
|
||||||
|
|
||||||
checkout_git "$NAME" "$URL" "$REV"
|
if [ -n "$URL" ] && [ -n "$REV" ]; then
|
||||||
|
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
|
||||||
count=3
|
count=3
|
||||||
while [ "x${FEED[count]}" != "x" ]
|
while [ "x${FEED[count]}" != "x" ]
|
||||||
do
|
do
|
||||||
local PATCH=${FEED[count]}
|
local PATCH=${FEED[count]}
|
||||||
if [ ! -z "$PATCH" ] ; then
|
if [ ! -z "$PATCH" ] ; then
|
||||||
echo "Patching $PATCH"
|
echo "Patching $PATCH"
|
||||||
git -C "$NAME" am --whitespace=nowarn "$PATCH"
|
git -C "$NAME" am --whitespace=nowarn "$PATCH"
|
||||||
else
|
else
|
||||||
echo "Warning, $PATCH not found."
|
echo "Warning, $PATCH not found."
|
||||||
fi
|
fi
|
||||||
count=$(( count + 1 ))
|
count=$(( count + 1 ))
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
cd .. # packages
|
cd .. # packages
|
||||||
|
@ -278,8 +280,12 @@ clean() {
|
||||||
FEED=("${!FEED}")
|
FEED=("${!FEED}")
|
||||||
|
|
||||||
local NAME=${FEED[0]}
|
local NAME=${FEED[0]}
|
||||||
|
local URL=${FEED[1]}
|
||||||
|
local REV=${FEED[2]}
|
||||||
|
|
||||||
/bin/rm -rf src/packages/"$NAME"
|
if [ -n "$URL" ] && [ -n "$REV" ]; then
|
||||||
|
/bin/rm -rf src/packages/"$NAME"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue