mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-30 14:46:31 +00:00
toolchain/patch-kernel.sh: xtensa directory overlay support
Part of #163. Signed-off-by: Maxim Grigoriev <maxim2405@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
58050c286b
commit
ebb0495936
@ -21,7 +21,14 @@ if [ ! -d "${patchdir}" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
|
for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
|
||||||
case "$i" in
|
apply="patch -p1 -E -d"
|
||||||
|
uncomp_parm=""
|
||||||
|
if [ -d "${patchdir}/$i" ] ; then
|
||||||
|
type="directory overlay"
|
||||||
|
uncomp="tar cf - --exclude=.svn --no-anchored -C"
|
||||||
|
uncomp_parm="."
|
||||||
|
apply="tar xvf - -C"
|
||||||
|
else case "$i" in
|
||||||
*.gz)
|
*.gz)
|
||||||
type="gzip"; uncomp="gunzip -dc"; ;;
|
type="gzip"; uncomp="gunzip -dc"; ;;
|
||||||
*.bz)
|
*.bz)
|
||||||
@ -32,13 +39,17 @@ for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
|
|||||||
type="zip"; uncomp="unzip -d"; ;;
|
type="zip"; uncomp="unzip -d"; ;;
|
||||||
*.Z)
|
*.Z)
|
||||||
type="compress"; uncomp="uncompress -c"; ;;
|
type="compress"; uncomp="uncompress -c"; ;;
|
||||||
|
*.tgz)
|
||||||
|
type="tar gzip"; uncomp="gunzip -dc"; apply="tar xvf - -C"; ;;
|
||||||
|
*.tar)
|
||||||
|
type="tar"; uncomp="cat"; apply="tar xvf - -C"; ;;
|
||||||
*)
|
*)
|
||||||
type="plaintext"; uncomp="cat"; ;;
|
type="plaintext"; uncomp="cat"; ;;
|
||||||
esac
|
esac fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "Applying ${i} using ${type}: "
|
echo "Applying ${i} using ${type}: "
|
||||||
echo ${i} | cat >> ${targetdir}/.applied_patches_list
|
echo ${i} | cat >> ${targetdir}/.applied_patches_list
|
||||||
${uncomp} ${patchdir}/${i} | patch -p1 -E -d ${targetdir}
|
${uncomp} ${patchdir}/${i} ${uncomp_parm} | ${apply} ${targetdir}
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
echo "Patch failed! Please fix $i!"
|
echo "Patch failed! Please fix $i!"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user