summaryrefslogtreecommitdiffstats
path: root/scripts/apply_patch_series.sh
diff options
context:
space:
mode:
authorLuotao Fu <l.fu@pengutronix.de>2006-09-12 11:38:14 +0000
committerLuotao Fu <l.fu@pengutronix.de>2006-09-12 11:38:14 +0000
commit1e842be20681facae96c67e0f4ac9bbf0925c154 (patch)
tree230f72cf2142968c7eb0feb0761129c06cdfed00 /scripts/apply_patch_series.sh
parentc07e189b83e808353ac39332a7156aca027207dc (diff)
downloadptxdist-1e842be20681facae96c67e0f4ac9bbf0925c154.tar.gz
ptxdist-1e842be20681facae96c67e0f4ac9bbf0925c154.tar.xz
now accepts parameter in serie file
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6041 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/apply_patch_series.sh')
-rwxr-xr-xscripts/apply_patch_series.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/apply_patch_series.sh b/scripts/apply_patch_series.sh
index 62360c65e..e97cbf1d9 100755
--- a/scripts/apply_patch_series.sh
+++ b/scripts/apply_patch_series.sh
@@ -55,7 +55,7 @@ pushd "$TARGET" || exit 1
cd $PATCHESPATH && find -name "*.patch" -or -name "*.diff" -or -name "*.gz" -or -name "*.bz2"
fi
} |
-egrep -v "^[[:space:]]*#" | egrep -v "^[[:space:]]*$" | while read patchfile unused; do
+egrep -v "^[[:space:]]*#" | egrep -v "^[[:space:]]*$" | while read patchfile patchpara; do
abspatch="$PATCHESPATH"/"$patchfile"
if [ ! -e "$abspatch" ]; then
echo "patch $abspatch does not exist. aborting"
@@ -73,7 +73,11 @@ egrep -v "^[[:space:]]*#" | egrep -v "^[[:space:]]*$" | while read patchfile unu
;;
esac;
echo "applying $abspatch"
- $CAT "$abspatch" | patch -p1 || exit 1
+ if [ $patchpara ];then
+ $CAT "$abspatch" | patch $patchpara || exit 1
+ else
+ $CAT "$abspatch" | patch -p1 || exit 1
+ fi
done
if [ "$?" != 0 ]; then