aboutsummaryrefslogtreecommitdiff
path: root/support/scripts
diff options
context:
space:
mode:
authorGravatar Fabio Porcedda <fabio.porcedda@gmail.com>2014-10-22 18:20:11 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-10-25 01:42:01 +0200
commit9a4e217b73bbf8fe0619f03c66f7301c4126b6a7 (patch)
treeb730596e9f5811d5342f16391ce8b7b373b3cb83 /support/scripts
parent1586ce3a3d427419bb83e6065f3536bfc36cdb13 (diff)
downloadbuildroot-9a4e217b73bbf8fe0619f03c66f7301c4126b6a7.tar.gz
buildroot-9a4e217b73bbf8fe0619f03c66f7301c4126b6a7.tar.bz2
apply-patches.sh: don't print anything when "make -s" is used
The make "-s" option is used to enable the "Silent operation" so if that option is used don't print anything as far as there isn't any error. Add the "-s" option to "apply-patches.sh" to enable silent operation. [Peter: use the existing QUIET variable] Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/scripts')
-rwxr-xr-xsupport/scripts/apply-patches.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 37f2d810ce..b32d592cf7 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -6,6 +6,8 @@
# (c) 2002 Erik Andersen <andersen@codepoet.org>
#
# Parameters:
+# - "-s", optional. Silent operation, don't print anything if there
+# isn't any error.
# - the build directory, optional, default value is '.'. The place where are
# the package sources.
# - the patch directory, optional, default '../kernel-patches'. The place
@@ -28,6 +30,13 @@
# applied. The list of the patches applied is stored in '.applied_patches_list'
# file in the build directory.
+silent=
+if [ "$1" = "-s" ] ; then
+ # add option to be used by the patch tool
+ silent=-s
+ shift
+fi
+
# Set directories from arguments, or use defaults.
builddir=${1-.}
patchdir=${2-../kernel-patches}
@@ -77,14 +86,16 @@ function apply_patch {
return 0
;;
esac
- echo ""
- echo "Applying $patch using ${type}: "
+ if [ -z "$silent" ] ; then
+ echo ""
+ echo "Applying $patch using ${type}: "
+ fi
if [ ! -e "${path}/$patch" ] ; then
echo "Error: missing patch file ${path}/$patch"
exit 1
fi
echo $patch >> ${builddir}/.applied_patches_list
- ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N
+ ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
if [ $? != 0 ] ; then
echo "Patch failed! Please fix ${patch}!"
exit 1