mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
Added diffstat generation.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2294 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -124,14 +124,24 @@ function specialize_patch {
|
||||
# and write the output either to stdout or to the file $1 (if not empty),
|
||||
# depending on the value of the variable ${multiple_patches}.
|
||||
function process_patch {
|
||||
local tmppatch
|
||||
if [ "${multiple_patches}" = "true" ]; then
|
||||
if [ "$1" != "" ]; then
|
||||
if [ -e "${patchdir}/$1" ]; then
|
||||
echo "Warning: overwriting ${patchdir}/$1"
|
||||
fi
|
||||
(
|
||||
specialize_patch
|
||||
) >"${patchdir}/$(basename $1)"
|
||||
tmppatch="/tmp/scst-tmp-patch-$$"
|
||||
(
|
||||
specialize_patch
|
||||
) >"${tmppatch}"
|
||||
touch "${tmppatch}"
|
||||
{
|
||||
awk 'BEGIN{h=1}/^diff/{h=0}/^---/{h=0}h!=0{print}' < "${tmppatch}";
|
||||
echo "---"; diffstat "${tmppatch}"; echo "";
|
||||
awk 'BEGIN{h=1}/^diff/{h=0}/^---/{h=0}h==0{print}' < "${tmppatch}";
|
||||
} \
|
||||
> "${patchdir}/$(basename $1)"
|
||||
rm -f "${tmppatch}"
|
||||
else
|
||||
# echo "Discarded $(wc -l) lines."
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user